Platform SDK: Terminal Services |
The VirtualChannelOpen function opens the client end of a virtual channel.
Terminal Services provides a pointer to a VirtualChannelOpen function in the CHANNEL_ENTRY_POINTS structure passed to your VirtualChannelEntry entry point.
UINT VirtualChannelOpen ( LPVOID pInitHandle, LPDWORD pOpenHandle, PCHAR pChannelName, PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc );
If the function succeeds, the return value is CHANNEL_RC_OK.
If an error occurs, the function returns one of the following values.
Value | Meaning |
---|---|
CHANNEL_RC_ALREADY_OPEN | The channel is already open. |
CHANNEL_RC_BAD_CHANNEL_HANDLE | The pOpenHandle parameter is not valid. |
CHANNEL_RC_BAD_INIT_HANDLE | The pInitHandle parameter is not valid. |
CHANNEL_RC_BAD_PROC | The pChannelOpenEventProc parameter is not valid. |
CHANNEL_RC_NOT_CONNECTED | The client has not connected to a terminal server. |
CHANNEL_RC_UNKNOWN_CHANNEL_NAME | The channel name specified by the pChannelName parameter is not registered by the client DLL or is otherwise invalid. |
The client DLL cannot call this function until the client has established a connection with a terminal server. Your VirtualChannelInitEvent function receives a CHANNEL_EVENT_CONNECTED notification when a terminal server connection is established.
Version: Requires RDP 5.0 client.
Header: Declared in Cchannel.h.
Terminal Services API Overview, Terminal Services API Functions, VirtualChannelClose, VirtualChannelInit, VirtualChannelInitEvent, VirtualChannelOpenEvent, VirtualChannelWrite