USB_NODE_CONNECTION_INFORMATION_EX structure (usbioctl.h)

The USB_NODE_CONNECTION_INFORMATION_EX structure is used in conjunction with the IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX request to obtain information about the connection associated with the indicated USB port.

Syntax

typedef struct _USB_NODE_CONNECTION_INFORMATION_EX {
  ULONG                 ConnectionIndex;
  USB_DEVICE_DESCRIPTOR DeviceDescriptor;
  UCHAR                 CurrentConfigurationValue;
  UCHAR                 Speed;
  BOOLEAN               DeviceIsHub;
  USHORT                DeviceAddress;
  ULONG                 NumberOfOpenPipes;
  USB_CONNECTION_STATUS ConnectionStatus;
  USB_PIPE_INFO         PipeList[0];
} USB_NODE_CONNECTION_INFORMATION_EX, *PUSB_NODE_CONNECTION_INFORMATION_EX;

Members

ConnectionIndex

Contains a value greater than or equal to 1 that specifies the number of the port.

DeviceDescriptor

Contains a structure of type USB_DEVICE_DESCRIPTOR that reports the USB device descriptor returned by the attached device during enumeration.

CurrentConfigurationValue

Contains the ID used with the SetConfiguration request to specify that current configuration of the device connected to the indicated port. For an explanation of this value, see section 9.4.7 in the Universal Serial Bus 3.1 Specification available at USB Document Library.

Speed

Contains a value of type USB_DEVICE_SPEED that indicates the speed of the device.

DeviceIsHub

Indicates, when TRUE, that the device attached to the port is a hub.

DeviceAddress

Contains the USB-assigned, bus-relative address of the device that is attached to the port.

NumberOfOpenPipes

Indicates the number of open USB pipes associated with the port.

ConnectionStatus

Contains an enumerator of type USB_CONNECTION_STATUS that indicates the connection status.

PipeList[0]

Contains an array of structures of type USB_PIPE_INFO that describes the open pipes associated with the port. Pipe descriptions include the schedule offset of the pipe and the associated endpoint descriptor. This information can be used to calculate bandwidth usage.

Remarks

If there is no device connected, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX` just returns information about the port. If a device is connected to the port IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX returns information about both the port and the connected device.

The USB_NODE_CONNECTION_INFORMATION_EX structure is an extended version of USB_NODE_CONNECTION_INFORMATION. The two structures are identical, except for one member. In the extended structure, the Speed member indicates the device speed.

The Speed member of the USB_NODE_CONNECTION_INFORMATION_EX structure is a UCHAR and it can specify any of the values of the USB_DEVICE_SPEED enumerator. The Speed member supports up to UsbHighSpeed (USB 2.0). To determine if a device supports UsbSuperSpeed (USB 3.0), use the USB_NODE_CONNECTION_INFORMATION_EX_V2 structure.

The following C++ code snippet from the USBView sample demonstrates how to determine if a device supports UsbSuperSpeed (USB 3.0):

// Since the USB_NODE_CONNECTION_INFORMATION_EX is used to display
// the device speed, but the hub driver doesn't support indication
// of superspeed, we overwrite the value if the super speed
// data structures are available and indicate the device is operating
// at SuperSpeed.

if (connectionInfoEx->Speed == UsbHighSpeed 
    && connectionInfoExV2 != NULL 
    && (connectionInfoExV2->Flags.DeviceIsOperatingAtSuperSpeedOrHigher ||
        connectionInfoExV2->Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher))
{
    connectionInfoEx->Speed = UsbSuperSpeed;
}

Requirements

Requirement Value
Header usbioctl.h (include Usbioctl.h)

See also