2.2.1.3 Device Announce Header (DEVICE_ANNOUNCE)

This header is embedded in the Client Device List Announce message. Its purpose is to describe different types of devices.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

DeviceType

DeviceId

PreferredDosName

...

DeviceDataLength

DeviceData (variable)

...

DeviceType (4 bytes): A 32-bit unsigned integer that identifies the device type. This field MUST be set to one of the following values.

Value

Meaning

RDPDR_DTYP_SERIAL

0x00000001

Serial port device

RDPDR_DTYP_PARALLEL

0x00000002

Parallel port device

RDPDR_DTYP_PRINT

0x00000004

Printer device

RDPDR_DTYP_FILESYSTEM

0x00000008<3>

File system device

RDPDR_DTYP_SMARTCARD

0x00000020<4>

Smart card device

DeviceId (4 bytes): A 32-bit unsigned integer that specifies a unique ID that identifies the announced device. This ID MUST be reused if the device is removed by means of the Client Drive Device List Remove packet specified in section 2.2.3.2.

PreferredDosName (8 bytes): A string of ASCII characters (with a maximum length of eight characters) that represents the name of the device as it appears on the client. This field MUST be null-terminated, so the maximum device name is 7 characters long. The following characters are considered invalid for the PreferredDosName field:

<, >, ", /, \, |

If any of these characters are present, the DR_CORE_DEVICE_ANNOUNC_RSP packet for this device (section 2.2.2.1) will be sent with STATUS_ACCESS_DENIED set in the ResultCode field.

If DeviceType is set to RDPDR_DTYP_SMARTCARD, the PreferredDosName MUST be set to "SCARD".

Note A column character, ":", is valid only when present at the end of the PreferredDosName field, otherwise it is also considered invalid.

DeviceDataLength (4 bytes): A 32-bit unsigned integer that specifies the number of bytes in the DeviceData field.

DeviceData (variable): A variable-length byte array whose size is specified by the DeviceDataLength field. The content depends on the DeviceType field. See [MS-RDPEPC] section 2.2.2.1 for the printer device type. See [MS-RDPESP] section 2.2.2.1 for the serial and parallel port device types. See section 2.2.3.1 of this protocol for the file system device type. For a smart card device, the DeviceDataLength field MUST be set to zero. See [MS-RDPESC] for details about the smart card device type.