我是 JNI 的新手,我想将三个整数传递给下面的函数
void pauseEffectJNI(unsigned int nSoundId)
{
// void pauseEffect(int)
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "pauseEffect", "(I)V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}
如果我错了请纠正我
如果 (!getStaticMethodInfo(methodInfo, "pauseEffect", "(I)V"))
(I;I;I)V 或只是 (III)V
如果我的函数是 void pauseEffectJNI(unsigned int nSoundId, unsigned int number1, unsigned int number2) ??
基本上我想知道如果我想通过多个 Integer 怎么办
感谢您的帮助...这是我制作的功能...如果我错了请纠正我
void pauseEffectJNI(unsigned int nSoundId , unsigned int number)
{
// void pauseEffect(int)
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo, "pauseEffect", "(III)V"))
{
return ;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId,(int) number);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
}