hello I am starting to learn how to import functions using
Win32::API

the following function outputs a pointer to a structure
and I understand how to use perls pack to "build" the required
structure.

WINSETUPAPI BOOL WINAPI
  SetupDiEnumDeviceInfo(
    IN HDEVINFO  DeviceInfoSet,
    IN DWORD  MemberIndex,
    OUT PSP_DEVINFO_DATA  DeviceInfoData
    );

typedef struct _SP_DEVINFO_DATA {
  DWORD  cbSize;
  GUID  ClassGuid;
  DWORD  DevInst;
  ULONG_PTR  Reserved;
} SP_DEVINFO_DATA, *PSP_DEVINFO_DATA;

SP_DEVINFO_DATA is represented as
$devdata = pack ( 'LL4LL', 28, 0, 0, 0 );

then setupdienumdeviceinfo can be called as
SetupDiEnumDeviceInfo( $devicedev, $index, $devdata );

my question is this; what if the structure is unknown?
how can I prepare a packed scalar of unknown size or
of variable size? 

BOOLEAN
  HidD_GetPreparsedData(
    IN HANDLE  HidDeviceObject,
    OUT PHIDP_PREPARSED_DATA  *PreparsedData
    );

looking at MSDN online we get the following
"The internal structure of a _HIDP_PREPARSED_DATA 
structure is reserved for internal system use"
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to