How to find out if a thread has message queue?
c++, message, message-queue, winapi, windows
Solution
You can use PostThreadMessage with the ID of the thread. If PostThreadMessage returns false and GetLastError returns `ERROR_INVALID_THREAD_ID`, the thread ID is invalid or the thread does not have a message queue.
More information http://msdn.microsoft.com/en-us/library/ms644946(VS.85).aspx
Problem
Is there any way to find out from threadId , if a thread has message queue or not? Basically there are some windows api which only work if a thread has message queue.window