Compartilhar via


VirtualChannelInitEventEx (Windows CE 5.0)

Send Feedback

This is an application defined callback function. A pointer to this function is passed to Terminal Services as a parameter of VirtualChannelInitEx. Terminal Services calls this function to notify the client DLL of virtual channel events.

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

typedef VOID VCAPITYPE VirtualChannelInitEventEx(LPVOID lpUserParam,LPVOID pInitHandle,UINT event,LPVOID pData,UINT dataLength);

Parameters

  • lpUserParam
    [in] Pointer to a user-defined value that is passed in callbacks.
  • pInitHandle
    [in] Handle to the client connection. This is the handle returned in the ppInitHandle parameter of the VirtualChannelInitEx 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 Values

None.

Remarks

The client DLL uses the VirtualChannelInitEx function to register its VirtualChannelInitEventEx 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 VirtualChannelEntryEx 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

OS Versions: Windows CE .NET 4.0 and later.
Header: Cchannel.h.
Link Library: Developer implemented.

See Also

RDP Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.