System.Classes.TStreamAdapter.CopyTo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CopyTo(stm: IStream; cb: LargeUInt; out cbRead: LargeUInt; out cbWritten: LargeUInt): HResult; virtual; stdcall;

C++

virtual HRESULT __stdcall CopyTo(_di_IStream stm, unsigned __int64 cb, /* out */ unsigned __int64 &cbRead, /* out */ unsigned __int64 &cbWritten);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TStreamAdapter

Description

Implements the IStream CopyTo method.

CopyTo copies up to cb bytes from the current position in the stream to the stream specified by stm. cbRead returns the number of bytes successfully read from the associated stream. cbWritten returns the number of bytes successfully written to stm.

CopyTo returns S_OK if it successfully copied all the bytes read from Stream to the interface specified by stm. It returns E_FAIL if it could not write all the bytes read from Stream to stm. It returns E_UNEXPECTED if it encountered an exception while attempting to perform the copy operation.

See Also