// usbioctl.h
// CTL_CODE(0x0022, 0x008, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_INTERNAL_USB_GET_HUB_NAME 0x00220020
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_INTERNAL_USB_GET_HUB_NAME I/O request is used by drivers to retrieve the UNICODE symbolic name for the target PDO if the PDO is for a hub. Otherwise a NULL string is returned.
Drivers can use the symbolic name to retrieve additional information about the hub through user-mode I/O control requests and WMI calls.
IOCTL_INTERNAL_USB_GET_HUB_NAME is a kernel-mode I/O control request. This request targets the USB hub PDO. This request must be sent at an IRQL of PASSIVE_LEVEL.
IRP_MJ_INTERNAL_DEVICE_CONTROL
Irp->AssociatedIrp.SystemBuffer points to a USB_HUB_NAME structure.
Parameters.DeviceIoControl.OutputBufferLength is the length of the buffer (in bytes) passed in the Irp->AssociatedIrp.SystemBuffer field.
Irp->AssociatedIrp.SystemBuffer is filled with the root hub's symbolic name.
The length of the root hub's symbolic name.
A lower-level driver sets Irp->IoStatus.Status to STATUS_SUCCESS or the appropriate error status. It will set Irp->IoStatus.Information to the number of bytes required to hold the USB_ROOT_HUB_NAME structure. If the request fails, the driver can use this information to resubmit the request with a big enough buffer.