IByteBuffer::CopyTo method
[The CopyTo method is available for use in the operating systems specified in the Requirements section. It is not available for use in Windows Server 2003 with Service Pack 1 (SP1) and later, Windows Vista, Windows Server 2008, and subsequent versions of the operating system. The IStream interface provides similar functionality.]
The CopyTo method copies a specified number of bytes from the current seek pointer in the object to the current seek pointer in another object.
Syntax
HRESULT CopyTo(
[in] LPBYTEBUFFER *pByteBuffer,
[in] LONG cb,
[out] LONG *pcbRead,
[out] LONG *pcbWritten
);
Parameters
-
pByteBuffer [in]
-
Points to the destination stream. The stream pointed to by pByteBuffer can be a new stream or a clone of the source stream.
-
cb [in]
-
Number of bytes to copy from the source stream.
-
pcbRead [out]
-
Pointer to the location where this method writes the actual number of bytes read from the source. You can set this pointer to NULL to indicate that you are not interested in this value. In this case, this method does not provide the actual number of bytes read.
-
pcbWritten [out]
-
Pointer to the location where this method writes the actual number of bytes written to the destination. You can set this pointer to NULL to indicate that you are not interested in this value. In this case, this method does not provide the actual number of bytes written.
Return value
The return value is an HRESULT. A value of S_OK indicates the call was successful.
Remarks
This method copies the specified bytes from one stream to another. It can also be used to copy a stream to itself. The seek pointer in each stream instance is adjusted for the number of bytes read or written.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows XP [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Header |
|
Type library |
|
DLL |
|
IID |
IID_IByteBuffer is defined as E126F8FE-A7AF-11D0-B88A-00C04FD424B9 |