Jeff Latimer : user32: DdeCreateStringHandle checks for an invalid instance Id and sets lastError for instances on that thread .