IOCTL_GET_USB_DESCRIPTOR IOCTL (usbscan.h)

Returns a specified USB Descriptor.

Major code

IRP_MJ_DEVICE_CONTROL

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.

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.

Requirements

Requirement Value
Header usbscan.h (include Usbscan.h)