Fills a device description block with collection description and the corresponding report ID information for the specified report descriptor. A HID minidriver generally does not need to call this function. Instead, it returns the report descriptor to Hidclass driver in response to IOCTL_HID_GET_REPORT_DESCRIPTOR.
NTSTATUS HidP_GetCollectionDescription( PHIDP_REPORT_DESCRIPTOR ReportDesc, ULONG DescLength, POOL_TYPE PoolType, PHIDP_DEVICE_DESC DeviceDescription );
A pointer to a UCHAR array that contains the raw report descriptor.
The length of the report descriptor array.
A POOL_TYPE-value that indicates the pool type from which memory for the linked list is allocated. This includes each HIDP_COLLECTION_DESC array element of HIDP_DEVICE_DESC, each HIDP_PREPARSED_DATA in each HIDP_COLLECTION_DESC, each HIDP_REPORT_IDS array element of HIDP_DEVICE_DESC.
A pointer to a HIDP_DEVICE_DESC structure that is populated with device description block filled in collection descriptors as linked lists. This is a caller-allocated structure. However, its HIDP_COLLECTION_DESC array elements and HIDP_REPORT_IDS array elements are allocated by this function.
HidP_GetCollectionDescription can return one of these values: TRUE if it successfully fills the device description block. Otherwise, it returns FALSE.
||Successfully parsed the report descriptor and allocated the memory blocks necessary to describe the device.|
||Failed to find top-level collections in the report descriptor.|
||An error was detected in the report descriptor. See the error code in Dbg field of the HIDP_DEVICE_DESC structure.|
||Found the end of the report descriptor when it expected more data.|
||Failed to allocate memory.|
||Failed to parse an item in the report descriptor.|
||Report ID of 0 was found in the descriptor.|
For a raw report descriptor that is specified by the ReportDesc parameter, HidP_GetCollectionDescription fills in the DeviceDescription block with a caller-allocated linked list of collection descriptors and the corresponding Report ID information that is described by the given report descriptor. The memory for the collection information and the ReportID information is allocated based on the PoolType value.
|Minimum supported client||Available in Windows 2000 and later versions of Windows.|
|Header||hidpddi.h (include Hidpddi.h)|