I have one dll, I want to load that dll into java native interface but it was not working properly. so now i try to create new dll file and load existing dll into that new dll file and access method from existing dll . How Can i do this ??. Please help me.
Following code which i write in .c file
typedef int * (_stdcall * OPENCOM) (int ComPort);
* Class: HelloPopup
* Method: OpenSerialPort
* Signature: (I)I
*/`enter code here`
JNIEXPORT jint JNICALL Java_HelloPopup_OpenSerialPortDll
(JNIEnv * env, jobject obj, jint ComPort)
OPENCOM pOpenCom ;
POpenCom = (OPENCOM) GetProcAddress (dllHandle, "OpenSerialPort");
int * ret = (* pOpenCom) (ComPort);
.. but when i call the method in java native interface i was got an error..So this code i am little bit confused about this code it is correct or not please help me.