VirtualChannelOpen function pointer
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
typedef UINT ( VCAPITYPE *VirtualChannelOpen)(
_In_ LPVOID pInitHandle,
_Out_ LPDWORD pOpenHandle,
_In_ PCHAR pChannelName,
_In_ PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc
);
Parameters
- pInitHandle [in]
-
Handle to the client connection. This is the handle returned in the ppInitHandle parameter of the VirtualChannelInit function.
- pOpenHandle [out]
-
Pointer to a variable that receives a handle that identifies the open virtual channel in subsequent calls to the VirtualChannelWrite and VirtualChannelClose functions.
- pChannelName [in]
-
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.
- pChannelOpenEventProc [in]
-
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.
| Return code | Description |
|---|---|
|
The channel is already open. |
|
The pOpenHandle parameter is not valid. |
|
The pInitHandle parameter is not valid. |
|
The pChannelOpenEventProc parameter is not valid. |
|
The client has not connected to an RD Session Host server. |
|
The channel name specified by the pChannelName parameter is not registered by the client DLL or is otherwise not valid. |
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
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Header |
|
See also
- VirtualChannelClose
- VirtualChannelInit
- VirtualChannelInitEvent
- VirtualChannelOpenEvent
- VirtualChannelWrite
Send comments about this topic to Microsoft
Build date: 10/26/2012