dll having method returning a class
How could I create a method in dll written in c++ which returns a class, and how could I use that dll in java?
If i am export that class th开发者_StackOverflow中文版e name of that class get changed. Could any body help me? Thanks in advance.
You can't export a C++ class from a DLL and use it from a different compiler. What you can, and should, do is to export a COM object.
You can't. You could use JNI, but that's pretty horrible, and you'll have to write the code to convert from a C++ object to a corresponding Java object.
You could also look at JNA, which tries to make this a little easier.
精彩评论