4 messages in net.java.dev.jna.usersRe: [jna-users] _HIDP_PREPARSED_DATA ...
FromSent OnAttachments
Alan VeaseyMar 31, 2008 10:41 am 
Timothy WallMar 31, 2008 11:22 am 
Alan VeaseyApr 3, 2008 8:24 am 
Timothy WallApr 3, 2008 8:33 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] _HIDP_PREPARSED_DATA structure defintion not availableActions...
From:Timothy Wall (twal@dev.java.net)
Date:Mar 31, 2008 11:22:19 am
List:net.java.dev.jna.users

On Mar 31, 2008, at 1:42 PM, Alan Veasey wrote:

Without taking too much time, I would like to say that this project is a God-send.

I need to call a Windows function called HidD_GetPreparsedData(). It's second argument is a structure called _HIDP_PREPARSED_DATA. The MSDN documentation for this structure says, "The internal structure of a _HIDP_PREPARSED_DATA structure is reserved for internal system use." I'm not sure where to go from here. I've tried making a new class by extended Structure and PointerType, but I keep getting an access violation. Any help with this would be greatly, greatly appreciated.

This is the API for HidD_GetPreparsedData(): BOOLEAN HidD_GetPreparsedData( IN HANDLE HidDeviceObject, OUT PHIDP_PREPARSED_DATA *PreparsedData );

This is the available struct def for PHIDP_PREPARSED_DATA: typedef struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA;

The function is asking for a pointer to pointer (PHIDP_PREPARSED_DATA *). You can use an instance of PointerByReference, or define your own XByReference type which holds a derived PointerType.

Thank you for this project and keep up the great work!

You're very welcome :)

T.