IWTSVirtualChannel::Write method (tsvirtualchannels.h)

Starts a write request on the channel. All writes are considered asynchronous. Calling this method copies the contents of pBuffer and returns immediately, so the buffer can be reclaimed. Because of the memory copy, too many Write() calls may result in allocating too much memory by the client.

A Close() call on this channel will cancel any pending writes.

When using the RDP stack, there is a max limit of 1590 bytes that can be written per call to this function. The call will not fail if this limit is exceeded. More specific details on the limit can be found in the DVC protocol spec 2.2.3.1 DVC Data First PDU (DYNVC_DATA_FIRST)

Syntax

HRESULT Write(
  [in]           ULONG    cbSize,
  [in]           BYTE     *pBuffer,
  [in, optional] IUnknown *pReserved
);

Parameters

[in] cbSize

The size, in bytes, of the buffer to which to write.

[in] pBuffer

A pointer to a buffer on the channel to which to write the data. You can reuse this buffer as soon as the call returns.

[in, optional] pReserved

Reserved for future use. The value must be NULL.

Return value

Returns S_OK if successful.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header tsvirtualchannels.h

See also

IWTSVirtualChannel