Share via


VirtualChannelInitEvent (Windows Embedded CE 6.0)

1/6/2010

This function is an application-defined callback function. Terminal Services calls this function to notify the client DLL of virtual channel events.

The PCHANNEL_INIT_EVENT_FN type defines a pointer to this callback function. VirtualChannelInitEvent is a placeholder for the application-defined or library-defined function name.

Syntax

VOID VCAPITYPE VirtualChannelInitEvent(
  LPVOID pInitHandle,
  UINT event,
  LPVOID pData,
  UINT dataLength
);

Parameters

  • pInitHandle
    [in] Handle to the client connection. This is the handle returned in the ppInitHandle parameter of the VirtualChannelInit function.
  • event
    [in] Indicates the event that caused the notification. The following table shows the values for this parameter.

    Value Description

    CHANNEL_EVENT_CONNECTED

    A connection has been established with a Terminal Server that supports virtual channels. The pData parameter is a pointer to a null-terminated string with the name of the server.

    CHANNEL_EVENT_DISCONNECTED

    The connection to the Terminal Server has been disconnected. The pData parameter is NULL.

    CHANNEL_EVENT_INITIALIZED

    The Remote Desktop client initialization has been completed. The pData parameter is NULL.

    CHANNEL_EVENT_TERMINATED

    The client has been terminated. The pData parameter is NULL.

    CHANNEL_EVENT_V1_CONNECTED

    A connection has been established with a Terminal Server that does not support virtual channels. The pData parameter is NULL.

  • pData
    [in] Pointer to additional data for the event. The type of data depends on the event, as described in the event descriptions.
  • dataLength
    [in] Specifies the size, in bytes, of the data in the pData buffer.

Return Value

None.

Remarks

The client DLL uses the VirtualChannelInit function to register its VirtualChannelInitEvent function with Terminal Services.

This function is reentrant on a per-handle basis. It may be called while it is executing, but not more than once on the same handle.

This function is called only after VirtualChannelEntry has completed.

CHANNEL_EVENT_CONNECTED and CHANNEL_EVENT_DISCONNECTED event notifications are not sent if the connection is transferred to another session. A server-side tool such as Tscon.exe can be used to do this. However, the server-side plug-in administering the session the connection is transferred to receives a reconnection notification.

If the user-mode plug-in must be notified that it has been reconnected, then the server-side plug-in should send a notification message to the client. This notification should use the same protocol the plug-ins use to communicate with each other.

Requirements

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

See Also

Reference

RDP Functions