CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Location
    Cebu Philippines
    Posts
    131

    FreeLibrary Hangs!

    Hi,

    What could be reasons why FreeLibrary Hangs?
    Code:
    CAPI::~CAPI()
    {
    	BOOL Status=AfxFreeLibrary(hDLL);
    }
    I run the application on the debugger and put a breakpoint on that line and the cursor wont move anymore, it just stays there.

    Any idea would be appreciated much.

    Thanks,
    Neil
    neilg_cebu@yahoo.com

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,152

    Re: FreeLibrary Hangs!

    Have you written this library by yourself?
    Perhaps the library is blocking in its DLL_PROCESS_DETACH or DLL_THREAD_DETACH handler?
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Jun 2004
    Location
    Cebu Philippines
    Posts
    131

    Re: FreeLibrary Hangs!

    Thanks for the idea, it really helps me. I need to call a function from that DLL inorder for that to be free and then FreeLibrary.

    Thanks a lot.
    Neil
    neilg_cebu@yahoo.com

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured