Using WIN32 DLL from Unix library

Holger Schlegel holgerschlegel at
Mon Apr 14 11:52:46 CDT 2003


because I want to do the same (calling functions in a windows native dll for
which I don't have the sources via java native interface on linux) I've made
some tests. I've started writing a jni dll for windows to use the windows
native dll and it works fine. "Converted" that library into a linux shared
library using winemaker and modified the to change the name of
the library from to The jni library can
be loaded by the java vm and native functions can be called. But there are a
few problems which I hadn't solved until now:

1.) The DllMain entry point of the library is not called.
2.) If I call the windows function LoadLibrary to load the native dll I want

to use, I get the following exception trace:
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : 11 occurred at PC=0x4C3B6496
>Current Java thread:
>	at de.spocks.vgap.v4.V4FaceLibrary.internalVersionNumber(Native Method)
>	at de.spocks.vgap.v4.V4FaceLibrary.getVersionNumber(
>	at TestV4Face.main(
>Dynamic libraries:

[snip (removed the java libs to shorten the message)]

>4c3b5000-4c3c9000 r-xp 00000000 21:07 474062


>4c3c9000-4c3ca000 rw-p 00013000 21:07 474062


>4c3dd000-4c3e2000 r-xp 00000000 21:07 2399074


>4c3e2000-4c3e3000 rw-p 00004000 21:07 2399074


>4c3f5000-4c4d5000 r-xp 00000000 21:07 2399073


>4c4d5000-4c4d7000 rw-p 000df000 21:07 2399073


>Local Time = Sun Apr 13 14:07:38 2003
>Elapsed Time = 0
># The exception above was detected in native code outside the VM
># Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode)

What is "Signal 11"? Maybe wine initialition is not correct but there are
loaded wine libraries. Any ideas why the call to LoadLibrary results in
that exception and how to solve that?


have fun,
    Holger Schlegel     eMail: holgerschlegel at
    Germany             ICQ#: 10514637

More information about the wine-users mailing list