Language: Visual C++ 6.0; MFC app with CWinApp-based class
I use a COM component (http://www.emailarchitect.net/webapp/popcom/) in MFC app. I release it BEFORE call of ExitInstance; in ExitInstance I call CoUninitialize. This CoUninitialize hangs. If I call CoUninitialize not from ExitInstance but right after the COM object is released - no hangs.
All I know about this COM component is it uses asyncronous mode amd uses sink interfaces for client notification. Partially it uses ATL's method DispEventAdvise. My application has not its own cycles of message processing - only standard MFC cycle in CWinApp.
The hang does not depend on what was used to initialize COM: CoInitialize( NULL ) or CoInitializeEx(NULL, COINIT_APARTMENTTHREADED).