Home > Back-end >  DLL library loaded successfully, one of the interface can't call
DLL library loaded successfully, one of the interface can't call

Time:09-21

The landlord to add two interfaces to a DLL (c + +), the dynamic invocation in the Java project in eclipse, the first call, the second cannot call,
Error message:
Serious: Servlet service () for the Servlet [for springMvc] in context with the path [/DMCP] threw the exception [Handler processing failed; nested exception is Java. Lang. Error: Invalid memory access] with root cause
Java. Lang. Error: Invalid memory access
The original poster in c + + write a test project, the dynamic invocation DLL, two interface does not appear problem,
The original poster in Java program debugging has been check to the calling card interface, parameter passing without error, the original poster can't see specific how to call in the Java project, can only follow up to the call to
I hope you give directions, so I can continue to pursue wrong point, (plate if choose wrong, hope to remind)

CodePudding user response:

Additional error information: org. Springframework. Web. Util. NestedServletException: Handler processing failed; Nested exception is Java. Lang. Error: Invalid memory access

CodePudding user response:

The original poster with the depends. Exe view the DLL file can see oneself add two interface
Of the following is a Java interface declaration:
Int SetPIPSingleChannelReplace (String STR, byte [] resStr, int bufflen);//can correct use
Int SetPIPInfo (String STR, byte [] resStr, int bufflen);//in the Java program cannot use
Because the interface format is used, the building Lord think can eliminate type conversion problem,
The original poster is trying to the order of the export file interface, name change, does not work,

CodePudding user response:

From your error message can guess is string space there is no application

CodePudding user response:

The dynamic library is written by C?
  • Related