Windows/COM events/strange behavior

Krzysztof Czarnowski Krzysztof.Czarnowski at dgt-lab.com.pl
Mon Oct 29 11:45:00 EST 2001


Sat, 27 Oct 2001 05:42:26 GMT
Mark Hammond wrote:

> As I said, this main thread probably needs to be calling
> PumpWaitingMessages() each time around the loop.


Well... This definitely doesn't look very elegant to me!

Anyway, if I got it well:

1. I should introduce CoInitialize()/CoUninitialize() pair in the main
thread *and* call PumpWaitingMessages() in its loop? Right? I assume that no
COM event will be delivered here, or will it?

2. No need to do this in other child threads (like the CORBA thread). Right?

3. Will the problem go away if:

 * the COM event handler is installed in a "free threaded appartment"? (can
I do this in a threading. thread?)

or

 * native Windows threads from ? (now module threading is used)


And generally, what would be *your* favorite solution? (my task is basically
to receive events from a COM driven subsystem and pass them to a CORBA
subsystem)

Thank you for the help so far
Krzysztof







More information about the Python-list mailing list