CoUninitialize in ExitInstance hangs
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: CoUninitialize in ExitInstance hangs

  1. #1
    Join Date
    Sep 2006

    CoUninitialize in ExitInstance hangs

    Language: Visual C++ 6.0; MFC app with CWinApp-based class
    OS: WinXP

    I use a COM component ( 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).

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: CoUninitialize in ExitInstance hangs

    Post some code, please.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center