M
marydeepthy
I have a java method createHeader, that returns a header object.
the header object is created in a native(c)method.the native method
returns a void *, but infact i have to convert that in to a jobject and
return that jobject to the java call.
how can i do this?
JNIEXPORT jobject JNICALL getheadervalue(JNIEnv *env, jobject obj,
jlong header, jint hid)
{
void* headerValue;
headerValue=GetValue((signed short)header, (unsigned char)hID,
headerValue);
return headerValue;//have to convert from void * to jobject
}
the header object is created in a native(c)method.the native method
returns a void *, but infact i have to convert that in to a jobject and
return that jobject to the java call.
how can i do this?
JNIEXPORT jobject JNICALL getheadervalue(JNIEnv *env, jobject obj,
jlong header, jint hid)
{
void* headerValue;
headerValue=GetValue((signed short)header, (unsigned char)hID,
headerValue);
return headerValue;//have to convert from void * to jobject
}