Starting a DVC Listener
To establish a successful connection between two dynamic virtual channel (DVC) modules that are running on the Remote Desktop Connection (RDC) client and server, a DVC listener must be running and in a listening state.
The instantiation of a listener typically occurs in the Initialize method of the DVC plug-in. However, instantiation is not limited to the Initialize method, and can be started at any point of the plug-in execution. The listener is described by the IWTSListener interface which is instantiated by the IWTSVirtualChannelManager. An instance to the channel manager is passed to the plug-in at the initialization point. The plug-in can maintain an internal reference to the instance as long as it needs to.
A plug-in can instantiate as many listeners as it needs to. Any incoming connection will be handled by IWTSListenerCallback, which is supplied in the CreateListener method of IWTSVirtualChannelManager. For an example, see the implementation of CDVCSamplePlugin::Initialize in the DVC Client Plug-in Example sample code.