To detect if a thread owns a message queue in Windows, use PostThreadMessage. If the function call fails, use GetLastError() to retrieve the error reason. It can be one of the following:
1. the thread id parameter does not specify a valid thread identifier
2. the thread doesn't have a message queue. href="../../../../../css/ie4.css" type="text/css" rel="stylesheet"> href="../../../../../css/inetsdk.css" type="text/css" rel="stylesheet"> href="ms-help://Hx/HxRuntime/HxLink.css" type="text/css" rel="stylesheet">
href="../../../../../css/ie4.css" type="text/css" rel="stylesheet">
href="../../../../../css/inetsdk.css" type="text/css" rel="stylesheet">
href="ms-help://Hx/HxRuntime/HxLink.css" type="text/css" rel="stylesheet">
1. the thread id parameter does not specify a valid thread identifier
2. the thread doesn't have a message queue. href="../../../../../css/ie4.css" type="text/css" rel="stylesheet"> href="../../../../../css/inetsdk.css" type="text/css" rel="stylesheet"> href="ms-help://Hx/HxRuntime/HxLink.css" type="text/css" rel="stylesheet">