2.2.1.3.1.1 PNP_DEVICE_DESCRIPTION
A client device description structure. This structure contains the required information to redirect a particular device.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ClientDeviceID |
|||||||||||||||||||||||||||||||
|
DataSize |
|||||||||||||||||||||||||||||||
|
cbInterfaceLength |
|||||||||||||||||||||||||||||||
|
InterfaceGUIDArray (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
cbHardwareIdLength |
|||||||||||||||||||||||||||||||
|
HardwareId (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
cbCompatIdLength |
|||||||||||||||||||||||||||||||
|
CompatibilityID (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
cbDeviceDescriptionLength |
|||||||||||||||||||||||||||||||
|
DeviceDescription (variable) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
CustomFlagLength |
|||||||||||||||||||||||||||||||
|
CustomFlag |
|||||||||||||||||||||||||||||||
|
cbContainerId (optional) |
|||||||||||||||||||||||||||||||
|
ContainerId (16 bytes, optional) |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
... |
|||||||||||||||||||||||||||||||
|
cbDeviceCaps (optional) |
|||||||||||||||||||||||||||||||
|
DeviceCaps (optional) |
|||||||||||||||||||||||||||||||
ClientDeviceID (4 bytes): A 32-bit unsigned integer. This value MUST be a unique ID generated by the client for the device. The server and client use this ID to refer to the device in subsequent messages.
DataSize (4 bytes): A 32-bit unsigned integer. This value specifies the size of the PNP_DEVICE_DESCRIPTION structure.
cbInterfaceLength (4 bytes): A 32-bit unsigned integer. This value MUST contain the length of the InterfaceGUIDArray field, in bytes. This field MAY be 0x00000000.
InterfaceGUIDArray (variable): An array of GUID values, as defined in [MS-DTYP] section 2.3.4, each representing a device interface exposed by the client-side device. If the value in the cbInterfaceLength field is 0x00000000, the InterfaceGUIDArray buffer MUST NOT be present.
cbHardwareIdLength (4 bytes): A 32-bit unsigned integer. This field specifies the length of the HardwareId field of the client-side device. This field MAY be 0x00000000.
HardwareId (variable): An array of bytes. A variable-length field that specifies a multisz string representing the hardware ID of the client-side device. If the value in the cbHardwareIdLength field is 0x00000000, the HardwareId buffer MUST NOT be present.
cbCompatIdLength (4 bytes): A 32-bit unsigned integer that specifies the length of the CompatibilityID field, in bytes. This field MAY be 0x00000000.
CompatibilityID (variable): An array of bytes. A variable-length field that specifies a multisz string representing the compatibility ID of the client-side device. If the value in the cbCompatIdLength field is 0x00000000, the CompatibilityID buffer MUST NOT be present.
cbDeviceDescriptionLength (4 bytes): A 32-bit unsigned integer that specifies the length of the DeviceDescription field, in bytes. This field MAY be 0x00000000.
DeviceDescription (variable): An array of bytes. A variable-length field that contains a Unicode string representing the device description of the client-side device. The string is not null-terminated. If the value contained in the cbDeviceDescriptionLength field is 0x00000000, the DeviceDescription buffer MUST NOT be present.
CustomFlagLength (4 bytes): A 32-bit unsigned integer. This field MUST be set to 0x00000004 because the CustomFlag field is hard-coded to be a 32-bit unsigned integer.
CustomFlag (4 bytes): A 32-bit unsigned integer that contains one of the following flags that indicates whether the device is an optional device. Optional devices are devices that the server MAY redirect; for all other devices, the server MUST redirect the device.
-
Value
Meaning
0x00000000
0x00000002
The device is redirectable.
0x00000001
The device is optionally redirectable.
cbContainerId (4 bytes): An optional, 32-bit unsigned integer. This field MUST be set to 0x00000010 because the ContainerId field is hard-coded to be a GUID.
ContainerId (16 bytes): A GUID that identifies a collection of devices that belong to the same physical hardware. Those are identified with the same GUID value. The field is introduced on RDP 7.0 or later clients. The fact that the field is not present means that the device is not a part of a composite device.<6>
cbDeviceCaps (4 bytes): An optional, 32-bit unsigned integer. This field MUST be set to 0x00000004 because the DeviceCaps field is hard-coded to be a 32-bit unsigned integer.<7>
DeviceCaps (4 bytes): An optional, 32-bit unsigned integer that contains device capability flags. This field can be a bitwise OR combination of the following values.<8>
-
Value
Meaning
PNP_DEVCAPS_LOCKSUPPORTED
0x00000001
The device supports locking.
PNP_DEVCAPS_EJECTSUPPORTED
0x00000002
The device supports ejecting.
PNP_DEVCAPS_REMOVABLE
0x00000004
The device is removable.
PNP_DEVCAPS_SURPRISEREMOVALOK
0x00000008
The device can be removed unexpectedly.