// usbdlib.h
USBD_STATUS USBD_ValidateConfigurationDescriptor(
[in] PUSB_CONFIGURATION_DESCRIPTOR ConfigDesc,
[in] ULONG BufferLength,
[in] USHORT Level,
[out] PUCHAR *Offset,
[in, optional] ULONG Tag
);
View the official Windows Driver Kit DDI referenceNo description available.
The USBD_ValidateConfigurationDescriptor routine validates all descriptors returned by a device in its response to a configuration descriptor request.
ConfigDesc [in]Pointer to a configuration descriptor that includes all interface, endpoint, vendor, and class-specific descriptors retrieved from a USB device.
BufferLength [in]Size, in bytes, of the configuration descriptor being validated.
Level [in]Level of validation to be performed. The following are valid values:
Offset [out]Offset within configuration descriptor where validation failed. Only valid when a status other than USBD_STATUS_SUCCESS is returned.
Tag [in, optional]Pool tag used by USBD_ValidateConfigurationDescriptor when allocating memory.
USBD_STATUS_SUCCESS, or appropriate USBD error code if validation failed.
USB device driver programming reference