I was going through the JNI tutorial and I came in the bottom row in the generated header file.
JNIXport Jabattere JNIKolJava_Reffile_loadfile (JNINW *, job, jostring); I jbyteArray , JNIEnv , Job and jstring . It is necessary that they pass information from another program to another. But I could not understand why JNIEXPORT and JNICALL are used and these are programmed (function, structure, anomim) - I am sorry that this question is very trivial ) What is called as? Any help is appreciated. After
JNIEXPORT and JNICALL are not the macros used to call and specify the linkage conference. JNI works and native method implementation.
See section 12.4
For example, in my JVM (Ubuntu 32 bit), header file contains jni_md.h : < Which will make your function look like: jbyteArray Java_ReadFile_loadFile (JNIEnv *, jobject, jstring); / p> #define JNIEXPORT #define JNIIMPORT #define JNICALL
While Win32 jni_md.h includes:
#define JNIEXPORT __declspec (dllexport) #define JNICALL __stdcall since Windows will use different calling traditions and your function will look like:
__dillexport jbyteArray __stdcall Java_ReadFile_loadFile (JNIEnv *, jobject, jstring);
Comments
Post a Comment