IWRdsProtocolManager::CreateListener method (wtsprotocol.h)

Requests the creation of an IWRdsProtocolListener object that listens for incoming client connection requests. The protocol provider must add a reference to the IWRdsProtocolListener object before returning. The Remote Desktop Services service releases the reference when the service stops or the listener object is deleted.

Syntax

HRESULT CreateListener(
  [in]  WCHAR                 *wszListenerName,
  [out] IWRdsProtocolListener **pProtocolListener
);

Parameters

[in] wszListenerName

A pointer to a string that contains the registry GUID that specifies the listener to create.

[out] pProtocolListener

The address of a pointer to the IWRdsProtocolListener object.

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 CreateListener method is the first call the Remote Desktop Services service makes into your protocol provider. The service looks in the registry under the following key to find the GUID of the listener to create:

HKEY_LOCAL_MACHINE
   System
      CurrentControlSet
         Control
            Terminal Server
               WinStations
                  ListenerName
                     LoadableProtocol_Object

Requirements

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

See also

IWRdsProtocolManager