VIRTUALCHANNELOPEN callback function (cchannel.h)
Opens the client end of a virtual channel.
Remote Desktop Services provides a pointer to a VirtualChannelOpen function in the CHANNEL_ENTRY_POINTS structure passed to your VirtualChannelEntry entry point.
Syntax
VIRTUALCHANNELOPEN Virtualchannelopen;
UINT VCAPITYPE Virtualchannelopen(
[in] LPVOID pInitHandle,
[out] LPDWORD pOpenHandle,
[in] PCHAR pChannelName,
[in] PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc
)
{...}
Parameters
[in] pInitHandle
Handle to the client connection. This is the handle returned in the ppInitHandle parameter of the VirtualChannelInit function.
[out] pOpenHandle
Pointer to a variable that receives a handle that identifies the open virtual channel in subsequent calls to the VirtualChannelWrite and VirtualChannelClose functions.
[in] pChannelName
Pointer to a null-terminated ANSI character string containing the name of the virtual channel to open. The name must have been registered when the client called the VirtualChannelInit function.
[in] pChannelOpenEventProc
Pointer to an application-defined VirtualChannelOpenEvent function that Remote Desktop Services calls to notify the client DLL of events for this virtual channel.
Return value
If the function succeeds, the return value is CHANNEL_RC_OK.
If an error occurs, the function returns one of the following values.
Remarks
The client DLL cannot call this function until the client has established a connection with an RD Session Host server. Your VirtualChannelInitEvent function receives a CHANNEL_EVENT_CONNECTED notification when an RD Session Host server connection is established.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | cchannel.h |