SebastianStricker
Programmer
Hello guys,
I have a question about waiting for a COM message in a function:
I set up an event-sink for COM events from another application in my function. Then I want the function to stop until the sink signalises that a COM message is received. The problem is that when i call WaitForSingleObject or something to wait for a CEevent or another synchronisation object, the whole thread sleeps an my sink with him - so the incoming messages are not processed.
I then tried to create a second thread with a local sink variable but what to do in this thread? I only want that thread to create a sink instance and then wait for incoming messages.
Remark: my sink is derived from CCmdTarget, may be there is a way of "polling" for incoming messages...?
Thanks,
Sebastian
I have a question about waiting for a COM message in a function:
I set up an event-sink for COM events from another application in my function. Then I want the function to stop until the sink signalises that a COM message is received. The problem is that when i call WaitForSingleObject or something to wait for a CEevent or another synchronisation object, the whole thread sleeps an my sink with him - so the incoming messages are not processed.
I then tried to create a second thread with a local sink variable but what to do in this thread? I only want that thread to create a sink instance and then wait for incoming messages.
Remark: my sink is derived from CCmdTarget, may be there is a way of "polling" for incoming messages...?
Thanks,
Sebastian