• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] JNI stuff

This topic is 6339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Thanks eh!

I ended up making my own wrapper for the few function calls I needed shortly after and that did work.

ao

Share this post


Link to post
Share on other sites

  • Advertisement