Serial Framework C++ Edition

◆ CopyTo()

virtual HRESULT STDMETHODCALLTYPE CopyTo ( IStream *  pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER *  pcbRead,
ULARGE_INTEGER *  pcbWritten 
)
overridevirtual

The method copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

Parameters
pstmA pointer to the destination stream. The stream pointed to by pstm can be a new stream or a clone of the source stream.
cbThe number of bytes to copy from the source stream.
pcbReadA pointer to the location where this method writes the actual number of bytes read from the source. You can set this pointer to NULL. In this case, this method does not provide the actual number of bytes read.
pcbWrittenA pointer to the location where this method writes the actual number of bytes written to the destination. You can set this pointer to NULL. In this case, this method does not provide the actual number of bytes written.
Returns
S_OK if operation completed with success.