IWTSProtocolListener::StartListen method (wtsprotocol.h)

[IWTSProtocolListener::StartListen is no longer available for use as of Windows Server 2012. Instead, use IWRdsProtocolListener::StartListen.]

Notifies the protocol to start listening for client connection requests.

Syntax

HRESULT StartListen(
  [in] IWTSProtocolListenerCallback *pCallback
);

Parameters

[in] pCallback

A pointer to an IWTSProtocolListenerCallback object implemented by the Remote Desktop Servicesservice. The protocol uses the IWTSProtocolListenerCallback object to notify the

Remote Desktop Services service about incoming connection requests. The protocol must add a reference to this object and release it when StopListen is called.

Return value

When you are implementing this method, return S_OK if the function succeeds. If it fails, return an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Remarks

The StartListen method is called when the Remote Desktop Services service starts.

  1. The Remote Desktop Services service calls CoCreateInstance to create an IWTSProtocolManager object.
  2. The Remote Desktop Services service calls CreateListener on the IWTSProtocolManager interface. The protocol creates an IWTSProtocolListener object and passes it back to the Remote Desktop Services service.
  3. The Remote Desktop Services service calls StartListen on the IWTSProtocolListener object.

Requirements

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

See also

IWTSProtocolListener