IMsTscAxEvents::OnDisconnected method

Called when the client control has been disconnected from the Remote Desktop Session Host (RD Session Host) server.

Syntax


void OnDisconnected(
  [inlong discReason
);

Parameters

discReason [in]

Specifies the reason for the disconnection. The following is a list of error codes. Some of these error codes are defined in Wincred.h.

disconnectReasonAtClientWinsockFDCLOSE (2308 (0x904))

Socket closed.

disconnectReasonByServer (3 (0x3))

Remote disconnection by server. This is not an error code.

disconnectReasonClientDecompressionError (3080 (0xC08))

Decompression error.

disconnectReasonConnectionTimedOut (264 (0x108))

Connection timed out.

disconnectReasonDecryptionError (3078 (0xC06))

Decryption error.

disconnectReasonDNSLookupFailed (260 (0x104))

DNS name lookup failure.

disconnectReasonDNSLookupFailed2 (1288 (0x508))

DNS lookup failed.

disconnectReasonEncryptionError (2822 (0xB06))

Encryption error.

disconnectReasonGetHostByNameFailed (1540 (0x604))

Windows Sockets gethostbyname call failed.

disconnectReasonHostNotFound (520 (0x208))

Host not found error.

disconnectReasonInternalError (1032 (0x408))

Internal error.

disconnectReasonInternalSecurityError (2310 (0x906))

Internal security error.

disconnectReasonInternalSecurityError2 (2566 (0xA06))

Internal security error.

disconnectReasonInvalidEncryption (1286 (0x506))

The encryption method specified is not valid.

disconnectReasonInvalidIP (2052 (0x804))

Bad IP address specified.

disconnectReasonInvalidServerSecurityInfo (1542 (0x606))

Server security data is not valid.

disconnectReasonInvalidSecurityData (1030 (0x406))

Security data is not valid.

disconnectReasonInvalidIPAddr (776 (0x308))

The IP address specified is not valid.

disconnectReasonLicensingFailed (2056 (0x808))

License negotiation failed.

disconnectReasonLicensingTimeout (2312 (0x908))

Licensing time-out.

disconnectReasonLocalNotError (1 (0x1))

Local disconnection. This is not an error code.

disconnectReasonNoInfo (0 (0x0))

No information is available.

disconnectReasonOutOfMemory (262 (0x106))

Out of memory.

disconnectReasonOutOfMemory2 (518 (0x206))

Out of memory.

disconnectReasonOutOfMemory3 (774 (0x306))

Out of memory.

disconnectReasonRemoteByUser (2 (0x2))

Remote disconnection by user. This is not an error code.

disconnectReasonServerCertificateUnpackErr (1798 (0x706))

Failed to unpack server certificate.

disconnectReasonSocketConnectFailed (516 (0x204))

Windows Sockets connect failed.

disconnectReasonSocketRecvFailed (1028 (0x404))

Windows Sockets recv call failed.

disconnectReasonTimeoutOccurred (1796 (0x704))

Time-out occurred.

disconnectReasonTimerError (1544 (0x608))

Internal timer error.

disconnectReasonWinsockSendFailed (772 (0x304))

Windows Sockets send call failed.

SSL_ERR_ACCOUNT_DISABLED (2823 (0xB07))

The account is disabled.

SSL_ERR_ACCOUNT_EXPIRED (3591 (0xE07))

The account is expired.

SSL_ERR_ACCOUNT_LOCKED_OUT (3335 (0xD07))

The account is locked out.

SSL_ERR_ACCOUNT_RESTRICTION (3079 (0xC07))

The account is restricted.

SSL_ERR_CERT_EXPIRED (6919 (0x1B07))

The received certificate is expired.

SSL_ERR_DELEGATION_POLICY (5639 (0x1607))

The policy does not support delegation of credentials to the target server.

SSL_ERR_FRESH_CRED_REQUIRED_BY_SERVER (8455 (0x2107))

The server authentication policy does not allow connection requests using saved credentials. The user must enter new credentials.

SSL_ERR_LOGON_FAILURE (2055 (0x807))

Login failed.

SSL_ERR_NO_AUTHENTICATING_AUTHORITY (6151 (0x1807))

No authority could be contacted for authentication. The domain name of the authenticating party could be wrong, the domain could be unreachable, or there might have been a trust relationship failure.

SSL_ERR_NO_SUCH_USER (2567 (0xA07))

The specified user has no account.

SSL_ERR_PASSWORD_EXPIRED (3847 (0xF07))

The password is expired.

SSL_ERR_PASSWORD_MUST_CHANGE (4615 (0x1207))

The user password must be changed before logging on for the first time.

SSL_ERR_POLICY_NTLM_ONLY (5895 (0x1707))

Delegation of credentials to the target server is not allowed unless mutual authentication has been achieved.

SSL_ERR_SMARTCARD_CARD_BLOCKED (8711 (0x2207))

The smart card is blocked.

SSL_ERR_SMARTCARD_WRONG_PIN (7175 (0x1C07))

An incorrect PIN was presented to the smart card.

Return value

This method does not return a value.

Remarks

To retrieve a description of the disconnect error, call the GetErrorDescription method and pass it the discReason parameter and the ExtendedDisconnectReason property of the IMsRdpClient interface.

For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Type library

MsTscAx.dll

DLL

MsTscAx.dll

IID

IMsTscAxEvents is defined as 336d5562-efa8-482e-8cb3-c5c0fc7a7db6

See also

IMsTscAxEvents

 

 

Show: