Partager via


Dynamic Virtual Channels (DVC) Sample (Compact 7)

3/12/2014

This sample shows you how to create the Dynamic Virtual Channel (DVC) client component and server component.

The source code is located in %_WINCEROOT%\PUBLIC\RDP\SDK\SAMPLES\DVC.

Prerequisites

  • Windows Embedded Compact 7
  • Windows Server 2008 Terminal Server
  • Visual Studio 2008
  • Windows SDK 6.1 or Windows 7 SDK

Using the Sample

To build and run the sample using an in-proc server

  1. In %_WINCEROOT%\PUBLIC\RDP\OAK\FILES\rdp.reg, add the following registry code to the CESYSGEN conditional statement for RDP_MODULES_TSCAXCTRL:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\Default\AddIns\DVCSmpl]
      "Name"="DVCSample.dll:{74738101-bfe5-4094-b874-d077e974d291}"
    
  2. Create an OS design based on either the Handheld or Windows Thin Client design templates, and build it into a run-time image. The OS design must include SYSGEN_RDP.

  3. In the Platform Builder build window, browse to %_WINCEROOT%\PUBLIC\RDP\SDK\SAMPLES\DVC\CLIENT\INPROC and type build to compile the sample code into DVCSample.dll.

  4. Download the run-time image onto the device.

  5. After the OS loads onto the device, start the RDP connection using the Remote Desktop client UI.

  6. After the RDP session is established, on the server run DVCServerApp.exe. The DVCServerApp.exe program will open a DVC channel that establishes communication between the client and server by using the RDP session.

To build and run the sample using an out-of-proc server

  1. In %_WINCEROOT%\PUBLIC\RDP\OAK\FILES\rdp.reg, add the following registry code to the CESYSGEN conditional statement for RDP_MODULES_TSCAXCTRL:

    [HKEY_CLASSES_ROOT\CLSID\{74738101-bfe5-4094-b874-d077e974d291}\LocalServer32]
    @="\\release\\DVCSample.exe"
    "ThreadingModel"="Free"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\Default\AddIns\DVCSmpl]
      "Name"="{74738101-bfe5-4094-b874-d077e974d291}"
    
  2. Create an OS design based on either the Handheld or Windows Thin Client design templates, and build it into a run-time image. The OS design must include SYSGEN_RDP.

  3. In the Platform Builder build window, browse to %_WINCEROOT%\PUBLIC\RDP\SDK\SAMPLES\DVC\CLIENT and type build to compile the sample code into DVCSample.dll.

  4. In the Platform Builder build window, browse to %_WINCEROOT%\PUBLIC\RDP\SDK\SAMPLES\DVC\CLIENT\DVCSAMPLEPS type build to compile the proxy stub code.

  5. Download the run-time image onto the device.

  6. After the OS loads onto the device, run the sample in the Target Control window.

    • On the Target menu, click Target Control.
    • At the command-line build prompt, type s regsvr32 DVCSamplePS.Dll.
  7. Start the RDP connection using the Remote Desktop client UI.

  8. After the RDP session is established, run DVCServerApp.exe from the console on the server.

For information on building the server side component of the sample see %_WINCEROOT%\PUBLIC\RDP\SDK\SAMPLES\DVC\README.TXT.

How the Sample Works

You can use this sample code to implement a new feature that uses a DVC channel to communicate between a Windows Embedded Compact powered device and a server; for example, an application that sends messages from a Terminal Services server to Windows Embedded Compact devices.

The sample consists of two components, one on the client and one on the server, which communicate with each other through a DVC channel that uses Remote Desktop Protocol (RDP).

You must implement the client component in a free-threading model, and you can implement it as either an in-proc server or an out-of-proc server. When you choose the out-of-proc server, you must also build and register a proxy stub. An out-of-proc server must be running on the local device. DCOM for Windows Embedded Compact supports only local process communications and not cross-computer COM.

See Also

Other Resources

Remote Desktop Connection
Dynamic Virtual Channels (DVC)