Hang when reloading a mixed mode CLR/C++ assembly using LoadLibrary


  • We are writing a plugin to a software application that requires a mixed mode C++/CLI dll.  The interface is exposed to applications as four exposed functions in the DLL.  The application will load the library using LoadLibrary to get some initial information and then call FreeLibrary after the initial call.  When it is ready to use the library again it will call LoadLibrary and then call the method.

    There are actually several clients that use this pattern and we aren't having any issues except for one of the applications.  The application with the problem is hanging after the second call to LoadLibrary when it tries to call into the assembly.

    The difference between the applications that work and the one that doesn't work is the fact that the path to the assembly is being passed in with forward slashes instead of backwards slashes.

    I found in

    that the API says not to use the forward slash when specifying the path name, but there are many plugins that are unmanaged that are being called with the forward slash that do not have the problem.

    I'm looking for an explanation for what is causing the hang.

    I have sample code, but I don't see how to post it here.  This is the first time I've asked a question on these forums.

    09 Maret 2012 14:22