Send a message to a particular thread

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello

If I want to send a message to a particular thread, how can I do that.

I know I can TerminateThread, but I want to do some housekeeping before
closing the thread. What is the most efficient way of doing this?

In my thread I am using WaitForSingleObject - waiting for events to become
signalled in a loop. Can I wait on this plus some thread message I can send
from outside the thread?

Really confused and looking for guidance.

angus@xxxxxxxxxxxxxxxxxxxx




.



Relevant Pages

  • Re: Send a message to a particular thread
    ... PostThreadMessage- MsgWaitForMultipleObjectsEx ... I know I can TerminateThread, but I want to do some housekeeping before ... signalled in a loop. ... Really confused and looking for guidance. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Send a message to a particular thread
    ... PostThreadMessage- MsgWaitForMultipleObjectsEx ... > signalled in a loop. ... > Really confused and looking for guidance. ... Prev by Date: ...
    (microsoft.public.win32.programmer.kernel)
  • RE: Use of TerminateThread Function
    ... it mentions TerminateThread is a dangerous function. ... Modify the while loop as below. ... you can set exit=1 to exit the while loop. ...
    (microsoft.public.windowsce.platbuilder)