3.3.5.10.1 Sending Save Session Info PDU
The structure and fields of the Save Session Info PDU are described in section 2.2.10.1.
The three reasons for sending this PDU are:
Notifying the client that the user has logged on (the username and domain which were used, as well as the ID of the session to which the user connected, can be included in this notification).
Transmitting an auto-reconnect cookie to the client (see section 1.3.1.5 for an overview of automatic reconnection).
Informing the client of an error or warning that occurred while the user was logging on.
The client SHOULD always be notified after the user has logged on. The INFOTYPE_LOGON (0x00000000), INFOTYPE_LOGON_LONG (0x00000001), or INFOTYPE_LOGON_PLAINNOTIFY (0x00000002) notification types MUST be used to accomplish this task.
A logon notification of type INFOTYPE_LOGON or INFOTYPE_LOGON_LONG SHOULD<50> be sent if the INFO_LOGONNOTIFY (0x00000040) flag was set by the client in the Client Info PDU (sections 2.2.1.11 and 3.3.5.3.1) or if the username or domain used to log on to the session is different from what was sent in the Client Info PDU (the original username or domain might have been invalid, resulting in the user having to re-enter its credentials at a remoted logon prompt). The LONG_CREDENTIALS_SUPPORTED (0x00000004) flag, in the extraFlags field of the General Capability Set (section 2.2.7.1.1) received from the client (section 3.3.5.3.13.2), determines whether the INFOTYPE_LOGON or INFOTYPE_LOGON_LONG type is used.
A logon notification of type INFOTYPE_LOGON_PLAINNOTIFY SHOULD be sent whenever a notification of type INFOTYPE_LOGON or INFOTYPE_LOGON_LONG would not be sent.
The techniques described in section 3.3.5.1 demonstrate how to initialize the contents of the PDU. The contents of this PDU SHOULD NOT be compressed.