Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 4.04 KB

ni-usbioctl-ioctl_internal_usb_get_controller_name.md

File metadata and controls

92 lines (66 loc) · 4.04 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NI:usbioctl.IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME (usbioctl.h)
The IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME I/O request queries the bus driver for the device name of the USB host controller.
buses\ioctl_internal_usb_get_controller_name.htm
usbref
05/07/2018
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME IOCTL
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME, IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME control, IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME control code [Buses], buses.ioctl_internal_usb_get_controller_name, usbioctl/IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME, usbirp_36fbf149-8f7d-46ac-9ef3-017cbb000e1c.xml
usbioctl.h
Windows
Windows
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME
usbioctl/IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME
APIRef
kbSyntax
HeaderDef
Usbioctl.h
IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME

IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME IOCTL

-description

The IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME I/O request queries the bus driver for the device name of the USB host controller.

IOCTL_INTERNAL_USB_GET_CONTROLLER_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.

-ioctlparameters

-ioctl-major-code

IRP_MJ_INTERNAL_DEVICE_CONTROL

-input-buffer

Parameters.Others.Argument1 should be a pointer to a USB_HUB_NAME structure that will be filled in with the name of the host controller.

-input-buffer-length

Parameters.Others.Argument2 should be a ULONG specifying the length of the buffer (in bytes) in Parameters.Others.Argument1.

-output-buffer

The bus driver will fill the buffer pointed to by Parameters.Others.Argument1 with the host controller device name.

-output-buffer-length

It will be filled only up to the length specified in Parameters.Others.Argument2.

-in-out-buffer

-inout-buffer-length

-status-block

The bus or port driver sets Irp->IoStatus.Status to STATUS_SUCCESS or the appropriate error status.

-remarks

The caller must supply a buffer that is large enough to hold a USB_HUB_NAME structure. The Parameters.Others.Argument2 value indicates size of that buffer. Upon successful completion, the HubName member of USB_HUB_NAME contains the name of the controller and the ActualLength member indicates the length of the controller name string. Note that ActualLength does not indicate the size of the entire USB_HUB_NAME structure. If the buffer supplied in Parameters.Others.Argument1 is not large enough to hold the string, the HubName value might show a truncated string.

To obtain the size of the buffer required to hold the string, send the request twice. In the first request, specify a buffer that is at least sizeof(USB_HUB_NAME) bytes. Otherwise, ActualLength does not indicate the correct length of the string and the request fails with STATUS_BUFFER_TOO_SMALL.

After the first request completes successfully, allocate a buffer of ActualLength + sizeof(ULONG) bytes and send the request again. After the request completes, HubName indicates the entire controller name string.

-see-also

USB_HUB_NAME