VirtualChannelOpen (Windows Embedded CE 6.0)

1/6/2010

This function opens the client end of a virtual channel.

Syntax

UINT VCAPITYPE VirtualChannelOpen(
  LPVOID pInitHandle,
  LPDWORD pOpenHandle,
  PCHAR pChannelName,
  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.
  • pChannelName
    [in] Pointer to a null-terminated string containing the name of the virtual channel to open. The name must have been registered when the client called VirtualChannelInit.
  • pChannelOpenEventProc
    [in] Pointer to an application-defined VirtualChannelOpenEvent function that Terminal Services calls to notify the client DLL of events for this virtual channel. The following table shows possible values for this parameter.

Return Value

The following table shows the return values for this function.

Value Description

CHANNEL_RC_OK

Function succeeded.

CHANNEL_RC_BAD_INIT_HANDLE

The pInitHandle parameter is not valid.

CHANNEL_RC_ALREADY_OPEN

The channel is already open.

CHANNEL_RC_BAD_CHANNEL_HANDLE

The pOpenHandle 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 server that is running Terminal Services.

CHANNEL_RC_UNKNOWN_CHANNEL_NAME

The channel name specified by the pChannelName parameter is not registered by the client DLL or is otherwise not valid.

Remarks

Terminal Services provides a pointer to a VirtualChannelOpen function in the CHANNEL_ENTRY_POINTS structure passed to your VirtualChannelEntry entry point.

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.

Requirements

Header cchannel.h
Library Developer Implemented
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

RDP Functions