Custom Virtual Channels Part 1: Creating a development environment

11:05 AM
Custom Virtual Channels Part 1: Creating a development environment -

Introduction

The development and deployment of a customized virtual channel may require a curve considerable learning before seeing positive progress. The purpose of this blog series will be to cut corners on this curve and enable faster time to market for developers.

We have found in our experience that the first barrier to the development of a customized virtual channel has been implementing and understanding the virtual environment of development of the channel. This post provides step by step instructions on creating a Windows development environment using sample code, and how to test the code once compiled. Subsequent messages will detail the code functionality and custom additional virtual channel deployment considerations.

Why the important virtual channels?

As the centralization of IT and cloud computing continuous transition, critical business applications and virtual desktops are increasingly centralized in the corporate data center. In tandem, mobile and feature rich devices continue to push the bar forward to experience the expected end user. Users expect their business terminals and applications companies to interact in harmony.

The challenge for Citrix architect / administrator becomes, how can I marry my functionality and data from the client device, with my data center centric business applications? A method includes, you guessed it, a Citrix virtual channel. Users already enjoy many default Citrix virtual channel characteristics such as redirection of clipboard, audio redirection, file redirection, redirect the microphone, Flash redirection, etc.

Developers can create custom virtual channels to extend the default functionality to fit their business needs. If common use for custom virtual channels include:

  • Creating a dedicated stream ICA data (as for printer traffic ICA)
  • client / control mechanisms data access server and operational management (such as USB redirection and clipboard)
  • management functionality of specialized client of the end device (such as Lync redirection)

How can I build a development environment?

For this series. blogs, we have created an example hello world using Windows 8 and server device 08 R2 XenApp 6.5 server

development and testing requires a 3 step process:

  • development environment set up
  • code creation and compilation
  • Installing files compiled to test the environment

the development of the example and test environment used the following components:

  • XenApp 6.5 Controller on Windows server 08 R2 (Citrix server device)
  • Visual studio 2012 installed on Windows (client terminal equipment) 8 Office

once the sample files were installed on the test client device, the custom channel is ready to be opened. The instantiation of the channel is performed by loading a DLL installed on the client device at the launch of the session. If successful, a notification message is displayed on the client device recognizing the instantiation of the channel.

An executable installed on the XenApp server is used to communicate through the new channel. Once launched a "Hello World" message is then transmitted over the channel from the XenApp server and displayed on the Windows client device. When the server message is closed on the client device, a second message is sent by the client and displayed in the server session.

To download sample documents please visit ShareFile link.

Development Environment Installation procedure (configured on Windows 8 desktop)

  1. Install Citrix VCSDK version 13: http://community.citrix.com/display / xa / Virtual channel + + SDK
  2. Install Citrix SDK WFAPI: http://community.citrix.com/display/xa/WinFrame+API+SDK
  3. Install Microsoft Visual studio 2012
  4. Install Microsoft Windows Software Development Kit for Windows 8: http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx
  5. Client-Side Compilation:
  1. Navigate to the client-side files in the development folder
  2. Copying% vdhwclient.h driveLetter% VCSDK WIN32 src examples vc shared inc
  3. Copy the folder% vdhwclient driveLetter% VCSDK WIN32 src examples vc customer
  4. Start "prompt developer controls for Visual studio 2012"
  5. Run codeHWclient.txt the code in the file to the command prompt (Note that we installed VCSDK on the root of a secondary drive D. You will need to update the client side build roads in the text containing D :. VCSDK your destination installation VCSDK chosen)
  • compilation server side:
    1. Access files in server-side development kit
    2. Copies vcnet visual studio directory documents
    3. launch vcnet.sln vcnet in the folder

    Install custom channel on the end device and the XenApp server:

    1. Client Setup (Windows 8 desktop with Citrix Receiver): Attention This fix requires you to edit the registry. Using incorrectly Registry Editor can cause serious problems that may require you to reinstall your operating system. Citrix can not guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before changing
    1. Install at least 3.0 Receiver
    2. Registry entries :.
    1. HKEY_LOCAL_MACHINE SOFTWARE Wow6432Node Citrix ICA Client Engine Configuration Advanced Modules ICA 3.0
    1. Reg_SZ: VirtualDriverEx = HWclient
  • HKEY_LOCAL_MACHINE SOFTWARE Wow6432Node Citrix ICA Client Engine Configuration Advanced Modules HWclient
    1. Reg_SZ: DriverNameWin32 vdhwclientn.dll =
  • Copy the file vdhwclientn.dll to C: Program Files (x86) Citrix ICA Client
  • server side (Windows server 0 R2 XenApp server):
    1. Copies CTXHW.exe and vcnet.dll to the folder location where the file will be executed CTXHW.exe
    2. Post office test server XenApp test user
    new virtual channel

    test

    1. office launch XenApp session from the server with CTXHW.exe and client device with the custom channel DLL installed.
    2. If the virtual channel is correctly installed a prompt message appears immediately.
    1. Note this prompt is intended for debugging and should be closed quickly or Citrix session creation fails.
  • Start a command prompt on the XenApp server
  • Navigate to the folder containing CTXHW.exe
  • CTXHW.exe Run the command line
  • server will send a message "Hello world" on the custom channel
  • message is displayed on the client device
  • After closing the message, the client meets the same message on the XenApp server
  • XenApp server then writes a message to the console
  • EXE server side stops execution
  • Disclaimer: As typical with code development, the example is not intended to be the only possible solution. For example, if you are developing for Windows 7 deployment, the code must be compiled on the same platform.

    Summary

    There is much more to the implementation of a customized virtual channel that just code development. Other considerations include the client / server schedule, client-side code deployment mechanisms, compatibility of client side devices, the executable service server side, and more. We hope to cover many of these topics in future posts, including a detailed walkthrough of the sample code.

    We hope this post helps kick off the implementation process of a virtual channel development project. If you have questions or comments, please post in the comment section below. In between our next post, take a look at the resources below for more information to start

    Continuing education :.

    • Virtual Channel SDK Documentation: in Virtual Channel SDK MSI
    • In depth introduction to the virtual channel architecture :. CTX11680
    I also thank and William Baumann Pablo Legorreta for their help in the creation of this position.

    Denial of

    this code / software sample is provided "AS IS" without representation, warranty or condition of any kind. You can use, modify and distribute at your own risk. CITRIX DISCLAIMS ALL WARRANTIES, EITHER EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software code / sample can introduce errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (B) it may not be possible to make the / example of fully functional software code; and (c) Citrix may, without notice or liability to you, cease to provide the current version and / or all future versions of the software code / sample. In any case, the software / code should be used to support ultra-hazardous activities, including but not limited to life support or blasting operations. CITRIX, ITS AFFILIATES OR AGENTS BE LIABLE FOR BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THE CODE software / SAMPLE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the software / code belongs to Citrix, any distribution of the code should include only your own standard award of copyright, and not that of Citrix. You agree to indemnify and defend Citrix against any claim arising from your use, modification or distribution of the code.

    Previous
    Next Post »

    1 comment