Hello,
I am running a single application on WinCE, with several threads. One thread is dedicated to my serial comms, where I receive data regularly at about 10Hz. From this thread I use PostThreadMessage with a (WM_APP + X) command to tell my main thread to process the data received serially and then display the corresponding info. The main thread is running in a message loop, waiting on GetMessage().
My problem is that the message to the main thread sometimes gets removed before the process functions are called (NB: the PostThreadMessage does not return 0). My understanding is that threads are initially created without a queue, however, by using the GetMessage function, a queue is created, and if not, the PostThreadMessage function would return 0.
Is that correct or do I have to use CreateMsgQueue (which I thought was only necessary between processes)? How can I find out how large my message queue is and what messages are on the queue?
Many thanks,
Sarah