[python-win32] Bug in pythoncom.CoInitialize(Ex)

Gabriel Genellina gagenellina at softlab.com.ar
Wed Nov 9 09:59:57 CET 2005


At Tuesday 8/11/2005 22:36, Mark Hammond wrote:

>What I propose is that I change CoInitialize() to ignore this specific
>RPC_E_CHANGED_MODE error.  My reasoning is that people calling
>CoInitialize() don't care about the threading model - all they want is to be
>able to use a COM object from their thread.  However, I think
>CoInitializeEx() should always raise an exception on error return, including
>for that specific error.  My reasoning is that people explicitly calling
>CoInitializeEx(thread_model) *do* care about the threading model, and may
>take great interest in the fact the thread has already been initialized
>differently.  If it is prepared to work in a different threading model, it
>just needs to catch the exception.

I think these are reasonable asumptions so it's unlikely you would break 
existing code. None mine, FWIW.


Gabriel Genellina
Softlab SRL 



More information about the Python-win32 mailing list