Re: Jawin-Calling a DLL Entry Point
Morten Andersen <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Hi Hua Hua Fang wrote: > > Assume the instruction string "AIGG::n4" I wrote is correct, now I got the > following exception: I looked quite a bit on this problem over the weekend, and I am sorry to say that the instruction string I thought was correct last week, is not correct. I have tried different instruction strings on some test-code with the same method-signature that you mentioned. And it seems that Jawin pt. is pretty bad at handling the construction with a caller-allocated buffer (as in your case). At least I have been unable to get it to work. Unfortunately, I can not promise you that I will find time to look further into the issue in the near future. Sorry about that. > > Exception in thread main:java.lang.NoSuchMethodError: > org.jawin.COMError:method <init>()V not found. This must be the native DLL code calling out into the JVM. The COMError does not have a no-arg constructor, but I am unable to find the call in the native code to this. So I am a little surprise this happens (perhaps a "null" deep down in the native code will trigger this behaviour - I will have to test that when I find time for it - thanks for bringing that to my attention). The COMError in the first place is triggered due to an unexpected runtime exception in the DLL (probably due to the incorrect instruction string) - there is not much you can do about this. I am sorry for not really bringing you any further. Best Regards Morten