J
John Perks and Sarah Mount
The header file (with macros replaced) has the declaration:
__declspec(dllimport) jint __stdcall JNI_CreateJavaVM(JavaVM**, void**
void*);
Have just upgraded to Update 5 of Java1.5, and can no longer link
against JVM.DLL. It appears that the program imports the stdcall-mangled
name __imp_JNI_CreateJavaVM@12 but JVM.DLL exports it unmangled. Also,
the Dependency Walker tool says that it is using C linkage, not stdcall.
(If I take off the dllimport, the __imp_ prefix is dropped).
For the VC people: does DependencyWalker examine the actual calling
convention used when listing a function as C or C++ in the export table,
or does it just check if the name is suitably mangled?
For the Java people: is this all as intended? Could it be that
JNI_CreateJavaVM does in fact use stdcall, but has an unmangled name
(presumably for ease or GetProcAddr/dlsym style dynamic loading)?
Shouldn't jni.h (or jni_md.h) have been updated?
For the VC people again: In the above case, how does one link to it with
the unmangled name but using stdcall, and could the function declaration
have been annotated (by some form of #pragma or __declspec) to make it
happen automatically?
And if you could explain what purpose dllimport serves (other than
adding the __imp_ prefix) I'd be grateful.
Thanks
John
__declspec(dllimport) jint __stdcall JNI_CreateJavaVM(JavaVM**, void**
void*);
Have just upgraded to Update 5 of Java1.5, and can no longer link
against JVM.DLL. It appears that the program imports the stdcall-mangled
name __imp_JNI_CreateJavaVM@12 but JVM.DLL exports it unmangled. Also,
the Dependency Walker tool says that it is using C linkage, not stdcall.
(If I take off the dllimport, the __imp_ prefix is dropped).
For the VC people: does DependencyWalker examine the actual calling
convention used when listing a function as C or C++ in the export table,
or does it just check if the name is suitably mangled?
For the Java people: is this all as intended? Could it be that
JNI_CreateJavaVM does in fact use stdcall, but has an unmangled name
(presumably for ease or GetProcAddr/dlsym style dynamic loading)?
Shouldn't jni.h (or jni_md.h) have been updated?
For the VC people again: In the above case, how does one link to it with
the unmangled name but using stdcall, and could the function declaration
have been annotated (by some form of #pragma or __declspec) to make it
happen automatically?
And if you could explain what purpose dllimport serves (other than
adding the __imp_ prefix) I'd be grateful.
Thanks
John