Possible Duplicate:
how dll created out of c++ source and how it is used in other sources?
I need to call a c++ code, which get the PID/VID of the external device in my java code. I googled and some info. By converting the c++ code to a dll, I can use it in my java code. Any suggestion to how to convert my c++ code to a dll file.
What you are looking for is JNI (Java Native Interface).
Here is a link for compiling a dll using VC++ – http://www.tidytutorials.com/2009/07/java-native-interface-jni-example-using.html
and one using MinGW – http://www.mingw.org/node/41