I have a dll file that contains the following function:
unsigned char * EncodingData(short Data[], int Length);
I want to call this native method in java. So I have created one wrapper dll that contains the follwing function corresponding to the above function
JNIEXPORT jcharArray JNICALL Java_com_common_FilterWrapper_EncodingData (JNIEnv * env, jclass cls, jshortArray shortData, jint len)
Now I am calling the above JNI function from java and it is being called successfully.
Problem:
I want to call the dll file's function from wrapper dll's function but I don't know how to convert the following:
jshortArray to short [] (to pass the data to the dll file's function which is expecting short [] and not jshortArray)
unsigned char to jcharArray (to return the value back to the java function)
Note: The wrapper dll is written in VC++