IWTSProtocolListenerCallback::OnConnected method (wtsprotocol.h)

[IWTSProtocolListenerCallback::OnConnected is no longer available for use as of Windows Server 2012. Instead, use IWRdsProtocolListenerCallback::OnConnected.]

Notifies the Remote Desktop Services service that a client connection request has been received. After this method is called, the Remote Desktop Services service begins the client connection sequence.

Syntax

HRESULT OnConnected(
  [in]  IWTSProtocolConnection         *pConnection,
  [out] IWTSProtocolConnectionCallback **pCallback
);

Parameters

[in] pConnection

A pointer to an IWTSProtocolConnection interface that represents a client connection. The Remote Desktop Services service adds a reference to this object and releases it when it closes the connection.

[out] pCallback

The address of a pointer to an IWTSProtocolConnectionCallback interface used by the protocol to notify the Remote Desktop Services service about the status of a client connection. The Remote Desktop Services service adds a reference to this object and the protocol must release it when the connection is closed.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following list. For a list of common error codes, see Common HRESULT Values.

Requirements

   
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wtsprotocol.h

See also

IWTSProtocolListenerCallback