3.1.5.2 Sending the RDP_PRECONNECTION_PDU_V2

The size that is sent in the cbSize field of the RDP_PRECONNECTION_PDU_V2 packet is calculated by adding the size of the RDP_PRECONNECTION_PDU_V1 header, cchPCB field, and wszPCB field. The size, in bytes, of the wszPCB field is calculated as the number of characters specified in the cchPCB field multiplied by 2. If the cchPCB field contains five characters, the cbSize will be 18 + (5 * 2) = 28. If the cchPCB field is 0, the wszPCB field is not present, and the cbSize field MUST be initialized with a value of 18.

The client MUST initialize the Version field with the RDP_PRECONNECTION_PDU_V2 value.

The client MUST initialize the cchPCB field with the number of characters in the wszPCB Unicode array.

The wszPCB field SHOULD<2> be set to a value that identifies the server-side process for which the connection is intended. Before the connection is established, the value can be determined either by convention or by communicating with the server through other mechanisms.