LoadLibrary failed with error 183 while loading crypto dll from another C++ program

47 views
Skip to first unread message

RituP

unread,
Apr 16, 2013, 11:36:34 AM4/16/13
to cryptop...@googlegroups.com

We are facing some issue with crypto dll and would really appreciate if we could get any help on this. We are using cryptopp version 5.6.1.0.

We have 2 separate java programs, both use the system.load()function to load a Cryptowrapper dll (it’s a CPP program which acts as a JNI -Java Native Interface). This Cryptowrapper inturn calls encrypt/decrypt functions in Crypto.dll.

For one of the Java program it works without any issue. The password gets encrypted properly.

But the other Java program when it invokes the JNI Cryptowrapper dll which further tries to load the crypto.dll. The crypto.dll loading fails; did a GetLastError()and got the system error code as 183.

myCrypto = LoadLibrary (cryptoPath);

here cryptoPath points to the complete path to crypto.dll.

Tried using both Loadlibrary() and LoadlibraryEx(), still it didn’t work.

myCrypto =LoadLibraryEx(cryptoPath, NULL, LOAD_IGNORE_CODE_AUTHZ_LEVEL);

Details about environment – Win XP/ MS Visual studio 2010 runtime environment.

This issue is Not recreated on all the test machines. However, on multiple machines where it does gets recreated, I am able to replicate it consistently.

Thanks in advance..

Reply all
Reply to author
Forward
0 new messages