IOCTL_GET_USB_DESCRIPTOR - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// usbscan.h

// CTL_CODE(0x8000, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_GET_USB_DESCRIPTOR 0x80002020
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-usbscan-ioctl_get_usb_descriptor)

IOCTL_GET_USB_DESCRIPTOR IOCTL

Description

Returns a specified USB Descriptor.

Parameters

Major code

Input buffer

Pointer to a USBSCAN_GET_DESCRIPTOR structure.

Input buffer length

Size of the input buffer.

Output buffer

Pointer to a USB_DEVICE_DESCRIPTOR, USB_STRING_DESCRIPTOR, or USB_CONFIGURATION_DESCRIPTOR structure.

Output buffer length

Size of the output buffer.

Input/output buffer

Input/output buffer length

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.

Remarks

DeviceIoControl Parameters

When the DeviceloControl function is called with the IOCTL_GET_USB_DESCRIPTOR I/O control code, the caller must specify the address of a USBSCAN_GET_DESCRIPTOR structure as the function's lpInBuffer parameter. Depending on the value specified for the DescriptorType member of the USBSCAN_GET_DESCRIPTOR structure, the function's lpOutbuffer parameter must point to either a USB_DEVICE_DESCRIPTOR, USB_STRING_DESCRIPTOR, or USB_CONFIGURATION_DESCRIPTOR structure.

The kernel-mode driver obtains a USB descriptor by calling UsbBuildGetDescriptorRequest.

For more information, see Accessing Kernel-Mode Drivers for Still Image Devices.

For more information about USB descriptors, see the Universal Serial Bus Specification.