Question : SendMessage

I'm having a problem with SendMessage and threads. I have an instance of my application which at a certain point uses SendMessage to send instructions to all other instances of the program. This works fine usually, however, under certain conditions, once the message is received, the other instance of the program might terminate a running thread. When this occurs, SendMessage does not return and freezes the calling thread in the sending instance of the application. PostMessage does not work to replace it, so I need to find a solution/explanation for the problem. I've tried synchronizing the SendMessage call in the sending thread, with no luck.

Answer : SendMessage

Random Solutions  
 
programming4us programming4us