vendredi 27 février 2015

I need explain of a code line of JNI for Android



I found this example at GitHub, http://ift.tt/1vFrfCW and i want to understand how works. I have a Question about some code with pointers.


This is the function's code:



static JavaVM *jvm;
void thread_detach() {
JNIEnv *env;
if ((*jvm)->GetEnv(jvm, (void **)&env, javaversion) == JNI_OK) {
(*jvm)->DetachCurrentThread(jvm);
}
}


If the jvm is a pointer how can he uses the operator -> and * together? In my compiler this an error point. Any ideas ? What means also this "(void **)&env" ?


Thanx




Aucun commentaire:

Enregistrer un commentaire