共用方式為


VirtualChannelWriteEx (Windows CE 5.0)

Send Feedback

This function sends data from the client end of a virtual channel to a partner application on the server end. It copies the data to one or more network buffers as necessary, and ensures that data is sent to the Terminal Server on the right context. This function is a virtual extension that can be used to protect per-session data in the virtual channel client DLL.

typedef UINT VCAPITYPE VIRTUALCHANNELWRITEEX(  LPVOID pInitHandle,  DWORD  openHandle,  LPVOID pData,  ULONG  dataLength,  LPVOID pUserData);

Parameters

  • pInitHandle
    [in] Pointer to a handle that identifies the client instance.
  • openHandle
    [in] Handle to the virtual channel. This is the handle returned in the pOpenHandle parameter of the VirtualChannelOpenEx function.
  • pData
    [in] Pointer to a buffer containing the data to write.
  • dataLength
    [in] Specifies the size, in bytes, of the data in the pData buffer.
  • pUserData
    [in] Pointer to an application-defined value. This value is passed to your VirtualChannelOpenEvent function when the write operation is completed or canceled.

Return Values

The following table shows the return values for this function.

Value Description
CHANNEL_RC_OK Function succeeded.
CHANNEL_RC_BAD_CHANNEL_HANDLE The openHandle parameter is not valid.
CHANNEL_RC_UNKNOWN_CHANNEL_NAME The channel is unregistered.

Remarks

The VirtualChannelWriteEx function is asynchronous. When the write operation has been completed, your VirtualChannelOpenEvent function receives a CHANNEL_EVENT_WRITE_COMPLETE notification. Until that notification is received, the caller must not free or reuse the pData buffer passed to VirtualChannelWriteEx.

The value specified for the pUserData parameter is passed to your VirtualChannelOpenEventEx function when the write operation is completed or canceled. You can use this data to identify the write operation.

Requirements

OS Versions: Windows CE 5.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.