Export (0) Print
Expand All
Expand Minimize

WTSVirtualChannelWrite function

Writes data to the server end of a virtual channel.

Syntax


BOOL WTSVirtualChannelWrite(
  _In_   HANDLE hChannelHandle,
  _In_   PCHAR Buffer,
  _In_   ULONG Length,
  _Out_  PULONG pBytesWritten
);

Parameters

hChannelHandle [in]

Handle to a virtual channel opened by the WTSVirtualChannelOpen function.

Buffer [in]

Pointer to a buffer containing the data to write to the virtual channel.

Length [in]

Specifies the size, in bytes, of the data to write.

pBytesWritten [out]

Pointer to a variable that receives the number of bytes written.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Note  WTSVirtualChannelWrite is not thread safe. To access a virtual channel from multiple threads, or to do asynchronous IO through a virtual channel, use WTSVirtualChannelQuery with WTSVirtualFileHandle.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wtsapi32.h

Library

Wtsapi32.lib

DLL

Wtsapi32.Dll

See also

WTSVirtualChannelRead
WTSVirtualChannelQuery

 

 

Show:
© 2014 Microsoft