Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Mapping Windows API to Java - JNA

807591Feb 25 2008 — edited Mar 3 2008
I am trying to use JNA to implement the functions in the Win32 USB API (http://www2.hawaii.edu/~hermany/api.htm)

I am trying to figure out how to map the following "HDEVINFO" which is defined as "typedef PVOID", which in turn is defined as typedef void* PVOID; (http://msdn2.microsoft.com/en-us/library/bb401729.aspx)

===================================================================================
/**
* From the API provided by Microsoft (http://msdn2.microsoft.com/en-us/library/ms792959.aspx)
* HDEVINFO
* SetupDiGetClassDevs(
* IN LPGUID ClassGuid, OPTIONAL
* IN PCTSTR Enumerator, OPTIONAL
* IN HWND hwndParent, OPTIONAL
* IN DWORD Flags
* );
*/
http://www.alanmacek.com/usb/DDKFiles/setupapi.h

typedef PVOID HDEVINFO;

====================================================================================

HDEVINFO is supposed to be an array of structures for the device information set. How do I map HDEVINFO on to the Java class that mirrors the SetupDiGetClassDevs function in the API?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2008
Added on Feb 25 2008
7 comments
1,459 views