The types described in this section are declared in the WinDriver/include/windrvr.h header file, unless otherwise specified in the documentation.
Enumeration of device registry property identifiers.
String properties are returned in NULL-terminated WCHAR array format.
![]() | |
For more information regarding the properties described in this enumaration,
refer to the description of the Windows
IoGetDeviceProperty() function's DeviceProperty
parameter in the Microsoft Development Network (MSDN) documentation.
|
| Enum Value | Description |
|---|---|
| WdDevicePropertyDeviceDescription | Device description |
| WdDevicePropertyHardwareID | The device's hardware IDs |
| WdDevicePropertyCompatibleIDs | The device's compatible IDs |
| WdDevicePropertyBootConfiguration | The hardware resources assigned to the device by the firmware, in raw data form |
| WdDevicePropertyBootConfigurationTranslated | The hardware resources assigned to the device by the firmware, in translated form |
| WdDevicePropertyClassName | The name of the device's setup class, in text format |
| WdDevicePropertyClassGuid | The GUID for the device's setup class (string format) |
| WdDevicePropertyDriverKeyName | The name of the driver-specific registry key |
| WdDevicePropertyManufacturer | Device manufacturer string |
| WdDevicePropertyFriendlyName | Friendly device name (typically defined by the class installer), which can be used to distinguish between two similar devices |
| WdDevicePropertyLocationInformation |
Information about the device's Location on the bus (string format). The interpertation of this information is bus-specific. |
| WdDevicePropertyPhysicalDeviceObjectName | The name of the Physical Device Object (PDO) for the device |
| WdDevicePropertyBusTypeGuid | The GUID for the bus to which the device is connected |
| WdDevicePropertyLegacyBusType | The bus type (e.g., PCIBus or PCMCIABus) |
| WdDevicePropertyBusNumber | The legacy bus number of the bus to which the device is connected |
| WdDevicePropertyEnumeratorName | The name of the device's enumerator (e.g., "PCI" or "root") |
| WdDevicePropertyAddress |
The device's bus address. The interpertation of this address is bus-specific. |
| WdDevicePropertyUINumber | A number associated with the device that can be displayed in the user interface |
| WdDevicePropertyInstallState | The device's installation state |
| WdDevicePropertyRemovalPolicy | The device's current removal policy (Windows XP and later) |
The following figure depicts the structure hierarchy used by WinDriver's USB API. The arrays situated in each level of the hierarchy may contain more elements than are depicted in the diagram. Arrows are used to represent pointers. In the interest of clarity, only one structure at each level of the hierarchy is depicted in full detail (with all of its elements listed and pointers from it pictured).
USB match table structure.
![]() | |
| (*) For all field members, if value is set to zero — match all. |
| Field | Type | Description |
|---|---|---|
| wVendorId | WORD | Required USB Vendor ID to detect, as assigned by USB-IF (*) |
| wProductId | WORD | Required USB Product ID to detect, as assigned by the product manufacturer (*) |
| bDeviceClass | BYTE | The device's class code, as assigned by USB-IF (*) |
| bDeviceSubClass | BYTE | The device's sub-class code, as assigned by USB-IF (*) |
| bInterfaceClass | BYTE | The interface's class code, as assigned by USB-IF (*) |
| bInterfaceSubClass | BYTE | The interface's sub-class code, as assigned by USB-IF (*) |
| bInterfaceProtocol | BYTE | The interface's protocol code, as assigned by USB-IF (*) |
USB events table structure.
This structure is declared in the
WinDriver/include/wdu_lib.h header file.
| Field | Type | Description |
|---|---|---|
| pfDeviceAttach | WDU_ATTACH_CALLBACK | Will be called by WinDriver when a device is attached |
| pfDeviceDetach | WDU_DETACH_CALLBACK | Will be called by WinDriver when a device is detached |
| pfPowerChange | WDU_POWER_CHANGE_CALLBACK | Will be called by WinDriver when there is a change in a device's power state |
| pUserData | PVOID | Pointer to user-mode data to be passed to the callbacks |
USB device information structure.
| Field | Type | Description |
|---|---|---|
| Descriptor | WDU_DEVICE_DESCRIPTOR |
Device descriptor information structure |
| Pipe0 | WDU_PIPE_INFO |
Pipe information structure |
| pConfigs | WDU_CONFIGURATION* |
Pointer to the beginning of an array of configuration information
structures |
| pActiveConfig | WDU_CONFIGURATION* |
Pointer to the device's active configuration information structurepConfigs array
|
| pActiveInterface |
WDU_INTERFACE* [WD_USB_MAX_INTERFACES] |
Array of pointers to interface information structures On Windows, the number of active interfaces is the number of interfaces supported by the active configuration, as stored in the pActiveConfig->dwNumInterfaces field.On Linux and Windows CE, the number of active interfaces is currently always 1, because the WDU_ATTACH_CALLBACK device-attach callback |
Configuration information structure.
| Field | Type | Description |
|---|---|---|
| Descriptor | WDU_CONFIGURATION_DESCRIPTOR |
Configuration descriptor information structure |
| dwNumInterfaces | DWORD | Number of interfaces supported by this configuration |
| pInterfaces | WDU_INTERFACE* |
Pointer to the beginning of an array of interface information
structures |
Interface information structure.
| Field | Type | Description |
|---|---|---|
| pAlternateSettings | WDU_ALTERNATE_SETTING* |
Pointer to the beginning of an array of alternate setting information
structures |
| dwNumAltSettings | DWORD | Number of alternate settings supported by this interface |
| pActiveAltSetting | WDU_ALTERNATE_SETTING* |
Pointer to an alternate setting information structure |
Alternate setting information structure.
| Field | Type | Description |
|---|---|---|
| Descriptor | WDU_INTERFACE_DESCRIPTOR |
Interface descriptor information structure |
| pEndpointDescriptors | WDU_ENDPOINT_DESCRIPTOR* |
Pointer to the beginning of an array of endpoint descriptor information
structures |
| pPipes | WDU_PIPE_INFO* |
Pointer to the beginning of an array of pipe information structures |
USB device descriptor information structure.
| Field | Type | Description |
|---|---|---|
| bLength | UCHAR | Size, in bytes, of the descriptor (18 bytes) |
| bDescriptorType | UCHAR | Device descriptor (0x01) |
| bcdUSB | USHORT | Number of the USB specification with which the device complies |
| bDeviceClass | UCHAR | The device's class |
| bDeviceSubClass | UCHAR | The device's sub-class |
| bDeviceProtocol | UCHAR | The device's protocol |
| bMaxPacketSize0 | UCHAR | Maximum size of transferred packets |
| idVendor | USHORT | Vendor ID, as assigned by USB-IF |
| idProduct | USHORT | Product ID, as assigned by the product manufacturer |
| bcdDevice | USHORT | Device release number |
| iManufacturer | UCHAR | Index of manufacturer string descriptor |
| iProduct | UCHAR | Index of product string descriptor |
| iSerialNumber | UCHAR | Index of serial number string descriptor |
| bNumConfigurations | UCHAR | Number of possible configurations |
USB configuration descriptor information structure.
| Field | Type | Description |
|---|---|---|
| bLength | UCHAR | Size, in bytes, of the descriptor |
| bDescriptorType | UCHAR | Configuration descriptor (0x02) |
| wTotalLength | USHORT | Total length, in bytes, of data returned |
| bNumInterfaces | UCHAR | Number of interfaces |
| bConfigurationValue | UCHAR | Configuration number |
| iConfiguration | UCHAR | Index of string descriptor that describes this configuration |
| bmAttributes | UCHAR |
Power settings for this configuration: • D6 — self-powered• D5 — remote wakeup (allows device to wake up the
host)
|
| MaxPower | UCHAR |
Maximum power consumption for this configuration, in 2mA units
|
USB interface descriptor information structure.
| Field | Type | Description |
|---|---|---|
| bLength | UCHAR | Size, in bytes, of the descriptor (9 bytes) |
| bDescriptorType | UCHAR | Interface descriptor (0x04) |
| bInterfaceNumber | UCHAR | Interface number |
| bAlternateSetting | UCHAR | Alternate setting number |
| bNumEndpoints | UCHAR | Number of endpoints used by this interface |
| bInterfaceClass | UCHAR | The interface's class code, as assigned by USB-IF |
| bInterfaceSubClass | UCHAR | The interface's sub-class code, as assigned by USB-IF |
| bInterfaceProtocol | UCHAR | The interface's protocol code, as assigned by USB-IF |
| iInterface | UCHAR | Index of string descriptor that describes this interface |
USB endpoint descriptor information structure.
| Field | Type | Description |
|---|---|---|
| bLength | UCHAR | Size, in bytes, of the descriptor (7 bytes) |
| bDescriptorType | UCHAR | Endpoint descriptor (0x05) |
| bEndpointAddress | UCHAR | Endpoint address: Use bits 0–3 for endpoint number, set bits 4–6 to zero (0), and set bit 7 to zero (0) for outbound data and to one (1) for inbound data (ignored for control endpoints). |
| bmAttributes | UCHAR | Specifies the transfer type for this endpoint (control, interrupt, isochronous or bulk). See the USB specification for further information. |
| wMaxPacketSize | USHORT | Maximum size of packets this endpoint can send or receive |
| bInterval | UCHAR |
Interval, in frame counts, for polling endpoint data transfers. Ignored for bulk and control endpoints. Must equal 1 for isochronous endpoints. May range from 1 to 255 for interrupt endpoints. |
USB pipe information structure.
| Field | Type | Description |
|---|---|---|
| dwNumber | DWORD | Pipe number; zero for the default control pipe |
| dwMaximumPacketSize | DWORD | Maximum size of packets that can be transferred using this pipe |
| type | DWORD | Transfer type for this pipe |
| direction | DWORD |
Direction of the transfer: • WDU_DIR_IN or WDU_DIR_OUT for
isochronous, bulk or interrupt pipes. • WDU_DIR_IN_OUT for control pipes.
|
| dwInterval | DWORD |
Interval in milliseconds. Relevant only to interrupt pipes. |