Hi...
I am not very familiar with c++ but I need to write a small Wrapperclass in C/C++ and converting it to a dll that accesses another dll.
Okay the wrapper works in the way I can access it via JNI.
But now I do not know how to acces the other dll. I need to call some functions that also return values. Here is what I found out, but that does not work:
JNIEXPORT jstring JNICALL Java_ETechnik_LpaIS_nativeCallGoal
(JNIEnv * env, jobject obj, jint value)
{
FARPROC libFunc;
int libFuncReturn;
jstring jstr;
HINSTANCE lib=LoadLibrary("Int386w.dll");
if(lib!=NULL)
{
libFunc = (FARPROC)GetProcAddress(lib, "nativeCallGoal");
if(libFunc!=NULL)
{
libFuncReturn=libFunc(value);
}
}
return jstr;
}
I need to return a jstring but I do not know how to acces the return of "libFunc". I think FARPROC is not the correct type.
Any help would be nice.
:)
Tweety