Posted By:
mylifesmile
Posted On:
Friday, October 5, 2012 12:13 AM
Hi all, I have to access some functions of 3rd party dll in my c++ class so that i can use in java, here are my code #include "stdafx.h" #include "HelloWorld.h" #include "jni.h" #include "stdio.h" #include "3rdPartyDll.h" JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject obj) { printf("Hello world\n"); return; } JNIEXPORT jint JNICALL Java_HelloWorld_print1(JNIEnv *env, jobject obj) { char* host="192.168.1.7";
More>>
Hi all,
I have to access some functions of 3rd party dll in my c++ class so that i can use in java,
here are my code
#include "stdafx.h"
#include "HelloWorld.h"
#include "jni.h"
#include "stdio.h"
#include "3rdPartyDll.h"
JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject obj)
{
printf("Hello world\n");
return;
}
JNIEXPORT jint JNICALL Java_HelloWorld_print1(JNIEnv *env, jobject obj)
{
char* host="192.168.1.7";
jint port=5000;
//here i want to call 3rd party dll function
initDevice();//this function belongs to other dll
return result;
}
can any one plz help? thanks
<<Less