Muokkaa

Jaa


DVC plug-in registration

The dynamic virtual channel (DVC) plug-in is registered for use by the Remote Desktop Connection (RDC) client using one of the following methods:

  • Invoking the IMsTscAdvancedSettings::put_PluginDlls method of the Remote Desktop Protocol (RDP) ActiveX control. Multiple entries must be comma separated.

  • Writing the plug-in entry to the following location in the registry on the computer where the Remote Desktop Connection (RDC) client process is started:

    HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\unique plug-in name

    Note

    You must create the unique plug-in name subkey if it does not exist. The unique plug-in name subkey name is an arbitrary string that can identify the plug-in. The string can be any combination of characters.

     

    Under unique plug-in name, you must add an entry that identifies the plug-in.

    Entry name = Name

    Data type = REG_SZ or REG_EXPAND_SZ

In both cases, the entry value must conform to one of the following formats:

"Plug-inDLLName:{CLSID}"

The plug-in is not necessarily registered in the Windows registry as a Component Object Model (COM) object, but the DLL is implemented as an in-process COM object. The RDC client will load the DLL specified by Plug-inDLLName and retrieve the COM object directly using CLSID.

"Plug-inDLLName"

The DLL implements the VirtualChannelGetInstance function and exports it by name. The RDC client will use the VirtualChannelGetInstance function to obtain IWTSPlugin interface pointers for all of the plug-ins implemented by the DLL.

"{CLSID}"

The RDC client will instantiate the plug-in as a regular COM object using CoCreateInstance with the CLSID.

Note

Plug-inDLLName represents the full path and file name of the .dll file. If the data type is REG_EXPAND_SZ, the path can contain unexpanded environment variables that are expanded at runtime.

 

When the Remote Desktop Connection (RDC) client finishes its initialization, it will perform the following for every registered plug-in:

  1. Obtain an instance of the IWTSPlugin interface for each plug-in using one of the methods described above.
  2. Call the Initialize method of each IWTSPlugin interface.
  3. If the client connects multiple times to the same or to a different server, there may be multiple calls to the Connected and Disconnected methods.
  4. The last call that the plug-in should handle is Terminated. It is a signal that the Remote Desktop Connection (RDC) client is about to unload the plug-in.