IWRdsProtocolListener::StartListen method (wtsprotocol.h)

Notifies the protocol to start listening for client connection requests.

Syntax

HRESULT StartListen(
  [in] IWRdsProtocolListenerCallback *pCallback
);

Parameters

[in] pCallback

A pointer to an IWRdsProtocolListenerCallback object implemented by the Remote Desktop Servicesservice. The protocol uses the IWRdsProtocolListenerCallback 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 IWRdsProtocolManager object.
  2. The Remote Desktop Services service calls CreateListener on the IWRdsProtocolManager interface. The protocol creates an IWRdsProtocolListener object and passes it back to the Remote Desktop Services service.
  3. The Remote Desktop Services service calls StartListen on the IWRdsProtocolListener object.

Requirements

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

See also

IWRdsProtocolListener