How to avoid loading an already loaded shared library
-
Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu
-
Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu
Yashusid wrote:
I have one JNI shared libray
As in Java Native Interface? If so this is not even close to being the correct forum. If not then what is it? Supply a link. In terms of loading modules into Windows Processes put all the modules in a single location. The loader will see that it is already loaded and not load it again. link[^] Note Use extreme care when using this value. If LoadLibrary or LoadLibraryEx is called for the same DLL after the DLL is loaded, then the DLL references will not have been resolved. This is because the second call to LoadLibrary or LoadLibraryEx simply returns a handle to the already loaded DLL. In this case, the process is likely to terminate abnormally.
led mike