[java] JNI stuff
I would like to call some win32 functions in the
user32.dll, but all the examples I see on the net
only call functions from user made
dll's.
Is this because I have to create a special .h
file with javah for when the dll is created?
If that is true then I can see why the user32.dll
wouldn't work and I would probable have to create
my own dll, then call the win32 functions from that.
I'm not sure if that is the reason, maybe someone
could fill me in.
If anyone has any examples of java calling win32 functions
please email them to me or provide a link.
Thanks,
ao
Edited by - ao on 9/12/00 9:03:35 PM
Play free Java games at: www.infinitepixels.com
You can only call user made DLLs. A DLL has to be
built for JNI to work. USER.DLL knows nothing about JNI
so it won''t work.
To call something in USER.DLL you have make
a intermediate C++ DLL that makes the call for
you.
Look at my open-source JWindows project
(a win32 wrapper for Java) here
http://www.rolemaker.dk/JWindows/index.htm
Yo might be able to use this library instead of writing
the calls yourself.
Cheers,
Jacob Marner
built for JNI to work. USER.DLL knows nothing about JNI
so it won''t work.
To call something in USER.DLL you have make
a intermediate C++ DLL that makes the call for
you.
Look at my open-source JWindows project
(a win32 wrapper for Java) here
http://www.rolemaker.dk/JWindows/index.htm
Yo might be able to use this library instead of writing
the calls yourself.
Cheers,
Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Thanks eh!
I ended up making my own wrapper for the few function calls I needed shortly after and that did work.
ao
I ended up making my own wrapper for the few function calls I needed shortly after and that did work.
ao
Play free Java games at: www.infinitepixels.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement