Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++ - DLL using JNI
I am using the C/C++ compiler version 8.49. I have a DLL that can be called from either a C/C++ program or from a Java program using the Java Native Interface (JNI). When called from a C++ program it works OK. When called from a Java program, it works OK until the DLL needs to terminate. Then I get a message box for a Java Application Error. It says "The instruction at 0x1004c962 referenced memory at 0x82db0008. The memory could not be read." The Java.exe program must be terminated using the task manager. I compile the DLL with other compilers and it works OK with Java. It is only Digital Mars that has a problem. Following is a copy of the def file, which is the only additional input to Digital Mars. Why will the DLL not terminate with Digital Mars? LIBRARY "AStylej.dll" DESCRIPTION 'AStyle as a JNI DLL' EXETYPE NT SUBSYSTEM WINDOWS CODE SHARED EXECUTE DATA WRITE EXPORTS _Java_ASInterface_AStyleMain 16 1 Java_ASInterface_AStyleMain = _Java_ASInterface_AStyleMain 16 2 _Java_ASInterface_GetVersion 8 3 Java_ASInterface_GetVersion = _Java_ASInterface_GetVersion 8 4 Aug 06 2007
jimp wrote:Why will the DLL not terminate with Digital Mars? Aug 06 2007
jimp wrote:Then I get a message box for a Java Application Error. It says "The instruction at 0x1004c962 referenced memory at 0x82db0008. The memory could not be read." Aug 06 2007
|