aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes Calls to Win32 API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Calls to Win32 API" Watch "Calls to Win32 API" New topic
Author

Calls to Win32 API

Amanda Albert
Ranch Hand

Joined: Jun 12, 2006
Posts: 41

I've been looking on Google all morning and I haven't found a straight answer. Is there a library or package in the Java API that allows us to call exported functions from Window systems DLLs? I'm mainly interested in setupapi, user32, and cfgmgr32 DLLs. I found there was once a com.ms.win32 package in Java 2.0, but I don't see any reference to it the Java 6.0 API documentation. There is the JInvoke software I could purchase, but is there something free? I found some code examples using JNI, but the examples discussed creating my own DLL and call javah to create a C header file; I don't want to do that, either.

I would appreciate just a little guidance on this issue, please.

Thanks!


Sun Certified Programmer for the Java 2 Platform 1.4
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
JNI. You don't need to create your own DLL if you already have a DLL to call. A naive web search:

http://java.sun.com/docs/books/jni/html/stubs.html#27578
http://www.codeproject.com/KB/java/jnibasics1.aspx
http://edn.embarcadero.com/article/20679

Do any of those help?
Amanda Albert
Ranch Hand

Joined: Jun 12, 2006
Posts: 41

Thanks! The last one I came across earlier and didn't seem to quite fit what I want to do. But I'll review the other two.

 
 
subject: Calls to Win32 API
 
developer file tools