Freigeben über


OnConnectionTerminated event

Called when the client's connection to the server is closed.

Syntax

void OnConnectionTerminated(
  [in] long discReason,
  [in] long ExtendedInfo
);

Parameters

discReason [in]

Reason why the client's connection to the server was closed. The connection was closed for one of the following reasons:

NoInfo (0)

No information is available.

LocalNotError (1)

Local disconnection. This is not an error code.

RemoteByUser (2)

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

ByServer (3)

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

DNSLookupFailed (260)

DNS name lookup failure.

OutOfMemory (262)

Out of memory.

ConnectionTimedOut (264)

Connection timed out.

SocketConnectFailed (516)

Windows Sockets connect failed.

OutOfMemory2 (518)

Out of memory.

HostNotFound (520)

Host not found error.

WinsockSendFailed (772)

Windows Sockets send call failed.

OutOfMemory3 (774)

Out of memory.

InvalidIPAddr (776)

Invalid IP address specified.

SocketRecvFailed (1028)

Windows Sockets recv call failed.

InvalidSecurityData (1030)

Invalid security data.

InternalError (1032)

Internal error.

InvalidEncryption (1286)

Invalid encryption method specified.

DNSLookupFailed2 (1288)

DNS lookup failed.

GetHostByNameFailed (1540)

Windows Sockets gethostbyname call failed.

InvalidServerSecurityInfo (1542)

Invalid server security data.

TimerError (1544)

Internal timer error.

NoTimeoutOccurred (1796)

Time-out occurred.

ServerCertificateUnpackErr (1798)

Failed to unpack server certificate.

InvalidIP (2052)

Bad IP address specified.

LicensingFailed (2056)

License negotiation failed.

InternalSecurityError (2310)

Internal security error.

AtClientWinsockFDCLOSE (2308)

Socket closed.

LicensingTimeout (2312)

Licensing time-out.

InternalSecurityError2 (2566)

Internal security error.

EncryptionError (2822)

Encryption error.

DecryptionError (3078)

Decryption error.

ClientDecompressionError (3080)

Decompression error.

ExtendedInfo [in]

Additional information as to why the connection was closed. Possible values include the following:

NoInfo (0x0000)

No additional information is available.

APIInitiatedDisconnect (0x0001)

An application initiated the disconnection.

APIInitiatedLogoff (0x0002)

An application logged off the client.

ServerIdleTimeout (0x0003)

The server has disconnected the client because the client has been idle for a period of time longer than the designated time-out period.

ServerLogonTimeout (0x0004)

The server has disconnected the client because the client has exceeded the period designated for connection.

ReplacedByOtherConnection (0x0005)

The client's connection was replaced by another connection.

OutOfMemory (0x0006)

No memory is available.

ServerDeniedConnection (0x0007)

The server denied the connection.

ServerDeniedConnectionFips (0x0008)

The server denied the connection for security reasons.

ServerInsufficientPrivileges (0x0009)

The connection was denied because the user account is not authorized for remote logon.

LicenseInternal (0x0100)

Internal licensing error.

LicenseNoLicenseServer (0x0101)

No license server was available.

LicenseNoLicense (0x0102)

No valid software license was available.

LicenseErrClientMsg (0x0103)

The remote computer received an invalid licensing message.

LicenseHwidDoesntMatchLicense (0x0104)

The hardware ID does not match the one designated on the software license.

LicenseErrClientLicense (0x0105)

Client license error.

LicenseCantFinishProtocol (0x0106)

Network problems occurred during the licensing protocol.

LicenseClientEndedProtocol (0x0107)

The client ended the licensing protocol prematurely.

LicenseErrClientEncryption (0x0108)

A licensing message was encrypted incorrectly.

LicenseCantUpgradeLicense (0x0109)

The local computer's client access license could not be upgraded or renewed.

LicenseNoRemoteConnections (0x010A)

The remote computer is not licensed to accept remote connections.

RdpEncInvalidCredentials (0x0300)

The connection was denied because the sharer was not able to authenticate the viewer.

ProtocolRangeStart through ProtocolRangeEnd (0x1000 - 0x7FFF)

Values in this range represent internal protocol errors. Check the server event log for additional details.

Return value

This event does not return a value.

Requirements

Minimum supported client
Windows Vista [desktop apps | UWP apps]
Minimum supported server
Windows Server 2008 [desktop apps | UWP apps]
Header
RdpEncomAPI.h
IDL
RdpEncomAPI.idl
Type library
RdpEncomAPI.tlb
DLL
RdpEncom.dll

See also

_IRDPSessionEvents