Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

USB_PORT_CONNECTOR_PROPERTIES (Structures)
 
.
Summary
TODO - Used with DeviceIOControl and IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES to get information about a port

C# Definition:

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct USB_PORT_CONNECTOR_PROPERTIES
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct USB_PORT_PROPERTIES
    {
        public uint ConnectionIndex;
        public uint ActualLength;
        public uint Properties;  
        public ushort CompanionIndex;
        public ushort CompanionPortNumber;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
        public string CompanionHubSymbolicLinkName;
        public ushort ul;
        public ushort Properties;
    }

VB Definition:

Structure USB_PORT_CONNECTOR_PROPERTIES
   Public TODO
End Structure

User-Defined Field Types:

None.

Notes:

The Properties field is a USB_PORT_PROPERTIES, which is a packed ULONG (32-bit int), as shown below.

  struct {
    ULONG PortIsUserConnectable : 1;
    ULONG PortIsDebugCapable : 1;
    ULONG PortHasMultipleCompanions : 1;
    ULONG PortConnectorIsTypeC : 1;
    ULONG ReservedMBZ : 28;
  };
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct USB_PORT_CONNECTOR_PROPERTIES
    {
        public uint ConnectionIndex;
        public uint ActualLength;
        public USB_PORT_PROPERTIES Properties;  
        public ushort CompanionIndex;
        public ushort CompanionPortNumber;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
        public string CompanionHubSymbolicLinkName;
    }

VB Definition:

Structure USB_PORT_CONNECTOR_PROPERTIES
   Public TODO
End Structure

User-Defined Field Types:

None.

USB_PORT_CONNECTOR_PROPERTIES is obtained from an control request using DeviceIOControl.

Notes:

The Properties field in USB_PORT_PROPERTIES is a packed UINT16.

0: PortIsUserConnectable

1: PortIsDebugCapable

2: PortHasMultipleCompanions

3: PortConnectIsTypeC

4-15: Reserved

The control code is:

    public const uint IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES = 0x00220458;

The documentation will lead you to believe that this (and ul) is a UINT32, but that's not correct. A quick peek in memory clearly shows it's a UINT16.

USB_PORT_CONNECTOR_PROPERTIES is obtained from an control request using DeviceIOControl.

The control code is:

    public const uint IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES = 0x00220458;

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions