M
M. Fernandez
Hi everyone,
I wanted to know if it is possible to modify in JNI a value given as
parameter, such as:
//Point class interface.
JNIEXPORT void JNICALL Java_temporal_RectangleProxy_printPoint
(JNIEnv *env, jobject jobj, jint ptr, jint var)
{
Rectangle* rectangle = (Rectangle*)ptr;
rectangle->point->printPoint();
printf("the given variable: %d\n",var);
var = 3;
}
I would like to modify the value of 'var' such that when I get back to
java, this value has changed.
Obviously, this code doesn't do it, but i would like to know if it is
possible (I don't want to return a value with the function because I
would like to work with jobjectArray with different values in each 'row'
and modify a variable that is given as parameter).
thanks a lot for your help,
MArcelo
I wanted to know if it is possible to modify in JNI a value given as
parameter, such as:
//Point class interface.
JNIEXPORT void JNICALL Java_temporal_RectangleProxy_printPoint
(JNIEnv *env, jobject jobj, jint ptr, jint var)
{
Rectangle* rectangle = (Rectangle*)ptr;
rectangle->point->printPoint();
printf("the given variable: %d\n",var);
var = 3;
}
I would like to modify the value of 'var' such that when I get back to
java, this value has changed.
Obviously, this code doesn't do it, but i would like to know if it is
possible (I don't want to return a value with the function because I
would like to work with jobjectArray with different values in each 'row'
and modify a variable that is given as parameter).
thanks a lot for your help,
MArcelo