dcsimg
The question is a bit wierd.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ranjan_Sinha
Posted On:   Thursday, March 7, 2002 01:25 AM

I have a JNI dll with one function somefunc(JNIEnv *,jclass ){ printf("hello world"); } My java code is able to successfully call this function But If I try to load this dll in a C application and call this function using loadLibrary and GetProcAddress, the application terminates abnormally I am passing NULL, NULL as function parameter. I fail to comprehend why the application is crashing when I am not using either JNIEnv or jclass parameter in my function.There seems to be no special code in jni.h that needs initialization. So my question is what is the difference in calling a jni function from a Java class and through an app written in c Thanks in advance    More>>

I have a JNI dll with one function

somefunc(JNIEnv *,jclass ){

printf("hello world");
}


My java code is able to successfully call this function

But If I try to load this dll in a C application and call this function using loadLibrary and GetProcAddress, the application terminates abnormally

I am passing NULL, NULL as function parameter. I fail to comprehend why the application is crashing when I am not using either JNIEnv or jclass parameter in my function.There seems to be no special code in jni.h that needs initialization. So my question is what is the difference in calling a jni function from a Java class and through an app written in c

Thanks in advance

   <<Less
About | Sitemap | Contact