posted 24 years ago
Hello Cindy,
I know about jacob, there's another product by a company called as Ice or something. But, since I want to code by myself and I am not willing to use any third party tools, as I really wish to learn JNI.
I have read the sun.java's tutorial (the same u've asked me to refer), but what I could figure out, that tut. was meant for C or C++.
What these people have asked to do is that create a header file and then include it that header file in your C or C++ program, and then create a .dll out of it. But, Visual Basic does not allow to include/ import any header files, and this is where I fail to proceed.
I have loaded the dll in memory using the System.loadLibrary method(), but when I try to call the native method it gives me the error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: sayHello at testJNI.main(testJNI.java:23)
In the tutorial refered by you, it says to write the function with the same name as it is in the header file created by the javah utility. Even this is not allowed in VB as VB does not support pointers.
I hope this clears my problem.