public ChannelReturnCodes Initialize()
        {
            ChannelDef[] cd = new ChannelDef[1];
            cd[0] = new ChannelDef
            {
                name = _channelName
            };

            return(_entryPoints.VirtualChannelInit(
                       ref _channel, cd, 1, 1, _channelInitEventDelegate));
        }
Пример #2
0
        public bool VirtualChannelInit()
        {
            var cd = new ChannelDef[1];

            cd[0] = new ChannelDef {
                name = ChannelMessage.ChannelName
            };
            var ret = entryPoints.VirtualChannelInit(ref Channel, cd, 1, 1, channelInitEventDelegate);

            if (ret != ChannelReturnCodes.Ok)
            {
                MessageBox.Show("TSTunnels: RDP Virtual channel Init Failed.\n" + ret, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
            return(true);
        }