This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yinkaisheng
Recipients yinkaisheng
Date 2013-11-30.05:46:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385790418.31.0.48461526792.issue19790@psf.upfronthosting.co.za>
In-reply-to
Content
http://support.microsoft.com/kb/305723

COM application hangs when you call CoCreateInstance from DllMain

SYMPTOMS
When you call the CoCreateInstance function from the DllMain function, the Component Object Model (COM) application hangs.

CAUSE
CoCreateInstance may start a thread that tries to call the DllMain function of all dynamic-link libraries (DLLs) that exist in the process by passing a DLL_THREAD_ATTACH value. Because the call originates from DllMain, and because DllMain is not a reentrant function, the call to CoCreateInstance never returns.

RESOLUTION
To resolve this problem, do not call CoCreateInstance from DllMain. You can move the call to an initialization function or to any other function that is called later.

STATUS
This behavior is by design.
History
Date User Action Args
2013-11-30 05:46:58yinkaishengsetrecipients: + yinkaisheng
2013-11-30 05:46:58yinkaishengsetmessageid: <1385790418.31.0.48461526792.issue19790@psf.upfronthosting.co.za>
2013-11-30 05:46:58yinkaishenglinkissue19790 messages
2013-11-30 05:46:57yinkaishengcreate