// usbioctl.h
// CTL_CODE(0x0022, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_USB_GET_NODE_CONNECTION_NAME 0x00220414
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_USB_GET_NODE_CONNECTION_NAME I/O control request is used with the USB_NODE_CONNECTION_NAME structure to retrieve the symbolic link name of the hub that is attached to the downstream port.
IOCTL_USB_GET_NODE_CONNECTION_NAME is a user-mode I/O control request. This request targets the USB hub device (GUID_DEVINTERFACE_USB_HUB).
The AssociatedIrp.SystemBuffer member points to a USB_NODE_CONNECTION_NAME structure. On input, the ConnectionIndex member of this structure must indicate the number of the port to check for an attached hub.
The size of a USB_NODE_CONNECTION_NAME structure.
AssociatedIrp.SystemBuffer points to a USB_NODE_CONNECTION_NAME structure. On output, this structure contains the symbolic name of the attached hub in the HubName member. If no hub is attached, the hub does not have a symbolic link, or the attached device is not a hub, HubName[0] will contain a value of UNICODE_NULL.
The Parameters.DeviceIoControl.OutputBufferLength member contains the size, in bytes, of the entire USB_NODE_CONNECTION_NAME structure.
The USB stack sets Irp->IoStatus.Status to STATUS_SUCCESS if the request is successful. The request reports success, even if no hub is attached, the attached hub has no symbolic link, or the attached device is not a hub.
Otherwise, the USB stack sets Status to the appropriate error condition, such as STATUS_INVALID_PARAMETER or STATUS_INSUFFICIENT_RESOURCES.