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:
-
No information is available.
-
Local disconnection. This is not an error code.
-
Remote disconnection by user. This is not an error code.
-
Remote disconnection by server. This is not an error code.
-
DNS name lookup failure.
-
Out of memory.
-
Connection timed out.
-
Windows Sockets connect failed.
-
Out of memory.
-
Host not found error.
-
Windows Sockets send call failed.
-
Out of memory.
-
Invalid IP address specified.
-
Windows Sockets recv call failed.
-
Invalid security data.
-
Internal error.
-
Invalid encryption method specified.
-
DNS lookup failed.
-
Windows Sockets gethostbyname call failed.
-
Invalid server security data.
-
Internal timer error.
-
Time-out occurred.
-
Failed to unpack server certificate.
-
Bad IP address specified.
-
License negotiation failed.
-
Internal security error.
-
Socket closed.
-
Licensing time-out.
-
Internal security error.
-
Encryption error.
-
Decryption error.
-
Decompression error.
- ExtendedInfo [in]
-
Additional information as to why the connection was closed. Possible values include the following:
-
No additional information is available.
-
An application initiated the disconnection.
-
An application logged off the client.
-
The server has disconnected the client because the client has been idle for a period of time longer than the designated time-out period.
-
The server has disconnected the client because the client has exceeded the period designated for connection.
-
The client's connection was replaced by another connection.
-
No memory is available.
-
The server denied the connection.
-
The server denied the connection for security reasons.
-
The connection was denied because the user account is not authorized for remote logon.
-
Internal licensing error.
-
No license server was available.
-
No valid software license was available.
-
The remote computer received an invalid licensing message.
-
The hardware ID does not match the one designated on the software license.
-
Client license error.
-
Network problems occurred during the licensing protocol.
-
The client ended the licensing protocol prematurely.
-
A licensing message was encrypted incorrectly.
-
The local computer's client access license could not be upgraded or renewed.
-
The remote computer is not licensed to accept remote connections.
-
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 | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
Type library |
|
|
DLL |
|
See also