I have been studying on ICA virtual channel customization recently and testing out the examples in the SDK for Windows on my XenApp 6 testbed. Not sure if anyone think the same way, but I find that the SDK programmer guide is very poorly written. After deploying the Ping examples on the XenApp server and client, I have a hard time getting it to work. When I run the ctxping.exe in the ICA session, I get this error:
Opened the channel, handle is 1413856.
WFVirtualChannelQuery() failed – 0
Now that I have figured it out on how to make it work, here are the steps for the benefit of others who are also trying out the examples and unable to get it to work.
Deploying the example on the server is easy. All you have to do is to copy the binary ctxping.exe to the XenApp server. Then publish the command prompt CMD.exe as a application on the server.
The easier way is to first install the Online Plugin on the client, then copy the DLL file (vdpingn.dll) to the ICA client folder, which should be “C:\Program Files\Citrix\ICA Client”. Then edit the registry so that the ICA client will load the DLL on startup. This is the part which is not well documented.
First create a key named vdping as follows:
and create the following REG_SZ entries under that key:
DriverName = Unsupported
DriverNameWin16 = Unsupported
DriverNameWin32 = vdpingn.dll
PingCount = 3
Lastly edit the entry at:
HKLM\Software\Citrix\ICA Client\Engine\Configuration\Advanced\Modules\ICA 3.0\VirtualDriver
and add vdping to the end of the list and reboot for the changes to take effect.
To run the example, launch the published command prompt application from XenApp, using either webinterface or Online Plugin. In the command prompt, run the ctxping.exe and you should see the ping results.