Loadlibrary freezes

I compiled a JNI dll that I would like to load into my Java application using System.loadLibrary. This works fine on Windows XP with a dll compiled using MSVC ++ 2008 Express.

However, in Windows 7, where I compiled the dll using MSVC ++ 2010 Express (the same parameters, the same processor architecture, the same version of Java, only a different OS and compiler), the application will depend on the call loadLibrary. No error messages, no reaction at all. When I try to jstackfreeze a process, it freezes (no exit, no interruption). Running the application as an administrator does not resolve this issue.

The DLL and all its dependencies are in java.library.path. In fact, when I deleted them, the Java application would tell me that they were missing, so the dll must be correctly initialized and something else has not been executed. However, debugging proves that it actually loadLibraryfreezes and nothing happens.

Can anyone tell me what could be here?


UPDATE

As stated in my comment below, this problem seems to be going deeper. Using a simple C program to load one of the dependencies of the mentioned DLL already makes it freeze, so this should be some kind of problem with the Windows API and as related to the MSVC ++ DLL (this dependency was also associated with MSVC ++ 2010 Express).

+3
source share
1 answer

DLL -, DLLMain().

, , , .

+4

All Articles