Two Laptop Bag*
The moose likes Java in General and the fly likes JNI and VC++ 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JNI and VC++ 6.0" Watch "JNI and VC++ 6.0" New topic
Author

JNI and VC++ 6.0

Bill White
Ranch Hand

Joined: Oct 27, 2002
Posts: 82
I can get my program to execute just fine when I compile my DLL in Debug. But when I move onto compiling in Release mode, the program blows up.
Is there anything that I must set in VC++ 6.0 to ensure that the DLL is built appropriately.
The code blows up at this line of code:
ret = ReadFile(src, buffer, max, &rlen, NULL);
I can say that in debug mode all the memory seems to be allocated correctly etc...
Thank You
Here is the stack trace:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f51c96
Function name=RtlpWaitForCriticalSection
Library=C:\WINDOWS\System32\ntdll.dll
Current Java thread:
at com.companyname.fileoperations.JniFileUtils.JniStart(Native Method)
at com.companyname.fileoperations.JniFileUtils.imageRead(JniFileUtils.java:46)
at com.companyname.fileoperations.JniFileUtils.main(JniFileUtils.java:72)
Dynamic libraries:
0x00400000 - 0x00419000 C:\BootManager\BootManager.exe
0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.DLL
0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
0x71AD0000 - 0x71AD8000 C:\WINDOWS\System32\WSOCK32.DLL
0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32\WS2_32.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\msvcrt.dll
0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll
0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.DLL
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x6D420000 - 0x6D4EE000 C:\Program Files\JavaSoft\JRE\1.3.1\bin\hotspot\jvm.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x6D220000 - 0x6D227000 C:\Program Files\JavaSoft\JRE\1.3.1\bin\hpi.dll
0x6D3B0000 - 0x6D3BD000 C:\Program Files\JavaSoft\JRE\1.3.1\bin\verify.dll
0x6D250000 - 0x6D266000 C:\Program Files\JavaSoft\JRE\1.3.1\bin\java.dll
0x6D3C0000 - 0x6D3CD000 C:\Program Files\JavaSoft\JRE\1.3.1\bin\zip.dll
0x10000000 - 0x10012000 C:\WINDOWS\system32\ImageManager.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNI and VC++ 6.0
 
Similar Threads
EXCEPTION_ACCESS_VIOLATION & MSAccess
Please help me. Strange problem
MSIE Java crashes
Print Problem...
Using JSObject for Java to Javascript communication crashes browser