IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// usbioctl.h

// CTL_CODE(0x0022, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES 0x00220458
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-usbioctl-ioctl_usb_get_port_connector_properties)

IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES IOCTL

Description

The IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES I/O control request is sent by an application to retrieve information about a specific port on a USB hub.

IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES is a user-mode I/O control request. This request targets the Universal Serial Bus (USB) hub device (GUID_DEVINTERFACE_USB_HUB).

Parameters

Major code

Input buffer

AssociatedIrp.SystemBuffer points to a caller-allocated USB_PORT_CONNECTOR_PROPERTIES structure. The caller must set the structure members as follows:

Input buffer length

The Parameters.DeviceIoControl.InputBufferLength member indicates the size, in bytes, of the caller-allocated buffer pointed to by AssociatedIrp.SystemBuffer. For more information see Remarks.

Output buffer

On output, USB_PORT_CONNECTOR_PROPERTIES, pointed to by AssociatedIrp.SystemBuffer, is filled with information about the physical connector associated with the port.

Output buffer length

The Parameters.DeviceIoControl.OutputBufferLength member indicates the size, in bytes, of the output buffer SystemBuffer.

Input/output buffer

Input/output buffer length

Status block

The USB stack sets Irp->IoStatus.Status to STATUS_SUCCESS if the request is successful. Otherwise, the USB stack sets Status to the appropriate error condition, such as STATUS_INVALID_PARAMETER or STATUS_INSUFFICIENT_RESOURCES. If the hub has not been started or is not functional, the request returns STATUS_UNSUCCESSFUL.

Remarks

The caller must supply a buffer that is large enough to hold a USB_PORT_CONNECTOR_PROPERTIES structure and the symbolic link name of a companion hub, if such a hub is associated with the specified port. To obtain the size of the buffer to allocate, the caller must send a IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES request. In the request, AssociatedIrp.SystemBuffer must be a caller-allocated USB_PORT_CONNECTOR_PROPERTIES structure and Parameters.DeviceIoControl.InputBufferLength must be sizeof(USB_PORT_CONNECTOR_PROPERTIES). Upon successful completion, the ActualLength member of USB_PORT_CONNECTOR_PROPERTIES indicates the actual size of the buffer. If a symbolic link name exists, the received value includes the size of the string that stores the link name.

Based on the ActualLength value, the caller can then allocate a buffer and send the IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES request again. After the request completes, the buffer is filled with port information and the CompanionHubSymbolicLinkName member is a Unicode string that contains the symbolic link name of the companion hub.

See also

IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES

USB_HUB_INFORMATION_EX

USB_PORT_CONNECTOR_PROPERTIES