Serial Framework C++ Edition

◆ Write()

virtual HRESULT STDMETHODCALLTYPE Write ( const void *  pv,
ULONG  cb,
ULONG *  pcbWritten 
)
overridevirtual

The method writes a specified number of bytes into the stream object starting at the current seek pointer.

Parameters
pvA pointer to the buffer that contains the data that is to be written to the stream. A valid pointer must be provided for this parameter even when cb is zero.
cbThe number of bytes of data to attempt to write into the stream. This value can be zero.
pcbWrittenA pointer to a ULONG variable where this method writes the actual number of bytes written to the stream object. The caller can set this pointer to NULL, in which case this method does not provide the actual number of bytes written.
Returns
S_OK if operation completed with success.