Share via


USB IOCTLs

Windows Driver Model (WDM) clients of the Universal Serial Bus (USB) driver stack communicate to the USB driver stack, by submitting an IRP with major code IRP_MJ_INTERNAL_DEVICE_CONTROL, and a minor code corresponding to an IOCTL value.

This topic provides a list the IOCTL values that client drivers can use. Kernel-mode I/O requests are for the exclusive use of client drivers. User-mode I/O requests can be used by client drivers and user-mode applications.

  • Kernel-Mode IOCTLs
  • User-Mode IOCTLs sent by applications and services
  • Deprecated and Reserved USB IOCTLs

Kernel-Mode IOCTLs

USB client drivers can receive or send any of the following I/O requests in kernel mode:

I/O Request Description
IOCTL_INTERNAL_USB_CYCLE_PORT Simulates a device unplug and replug on the port associated with the PDO.
IOCTL_INTERNAL_USB_GET_BUS_INFO Queries the bus driver for certain bus information.
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME Queries the bus driver for the device name of the USB host controller.
IOCTL_INTERNAL_USB_GET_DEVICE_CONFIG_INFO Gets information about a USB device and the hub it is attached to.
IOCTL_INTERNAL_USB_GET_HUB_NAME Retrieves the Unicode symbolic name for the target PDO if the PDO is for a hub.
IOCTL_INTERNAL_USB_GET_PORT_STATUS Gets the status of the PDO.
IOCTL_INTERNAL_USB_GET_TOPOLOGY_ADDRESS Retrieves information about the host controller the USB device is attached to, and the device's location in the USB device tree.
IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE Registers the parent driver of a USB multi-function device (composite driver) with the underlying USB driver stack.
IOCTL_INTERNAL_USB_RESET_PORT Reset the upstream port of the device it manages.
IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION Informs the USB bus driver that a device is idle and can be suspended.
IOCTL_INTERNAL_USB_SUBMIT_URB Submit an URB to the bus driver.
IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE Unregisters the parent driver of a USB multi-function device (composite driver) and releases all resources associated with registration.
IOCTL_INTERNAL_USB_REQUEST_REMOTE_WAKE_NOTIFICATION Sent by the parent driver of a USB multi-function device (composite driver) to request remote wake-up notifications from a specific function in the device.

 

User-Mode IOCTLs sent by applications and services

USB client drivers receive these user-mode I/O control requests at the kernel level:

I/O Request Description Device interface GUID
IOCTL_GET_HCD_DRIVERKEY_NAME Retrieves the driver key name in the registry for a USB host controller driver. GUID_DEVINTERFACE_USB_HOST_CONTROLLER
IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION Retrieves one or more descriptors for the device that is associated with the indicated port index. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_HUB_CAPABILITIES_EX Retrieves the capabilities of a USB hub. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_HUB_INFORMATION_EX Retrieves information about a particular USB hub type, its descriptor, and indicates the number of ports on the hub. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 Retrieves speed information about a USB device attached to a particular port. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES Retrieves the Microsoft-extended port attributes for a specific port. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME Retrieves the driver registry key name that is associated with the device that is connected to the indicated port. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION Retrieves information about the indicated USB port and the device that is attached to the port, if there is one. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX Retrieves information about a USB port and the device that is attached to the port, if there is one. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_NAME Retrieves the symbolic link name of the hub that is attached to the downstream port. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_INFORMATION Retrieves information about a parent device. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX Retrieves information about a USB port and the device that is attached to the port if there is one. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES Retrieves information about a specific port on a USB hub. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_GET_ROOT_HUB_NAME Retrieves the symbolic link name of the root hub. GUID_DEVINTERFACE_USB_HOST_CONTROLLER
IOCTL_USB_HUB_CYCLE_PORT Power cycles the port that is associated with the PDO that receives the request. GUID_DEVINTERFACE_USB_HUB
IOCTL_USB_USER_REQUEST Available to both user-mode applications and kernel-mode drivers. GUID_DEVINTERFACE_USB_HOST_CONTROLLER

 

Deprecated and Reserved USB IOCTLs

The following I/O requests have been deprecated or reserved for internal use. USB client drivers must not use these I/O requests:

USB Reference

 

 

Send comments about this topic to Microsoft