IOCTL_GET_USB_DESCRIPTOR IOCTL

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

   
Header usbscan.h (include Usbscan.h)