WTSVirtualChannelRead and WTSVirtualChannelWrite API are one of the badly designed API by Microsoft.
First, you cannot use WTSVirtualChannelRead() and WTSVirtualChannelWrite() from any thread due to the asynchronous I/O. You have to use WTSVirtualChannelQuery() to obtain the file handle and then you do reads and writes to the Virtual Channel via ReadFile() and WriteFile().
Also when reading the Virtual Channel, you have to handle you have to handle situations where ReadFile() returns immediately because there is data available and ReadFile() which is blocked and you wait until the I/O completes and then call GetOverLappedResult().
For more details follow http://blogs.msdn.com/b/rds/archive/2007/09/20/dynamic-virtual-channels.aspx