System.Classes.TStreamAdapter.Read
Delphi
function Read(pv: Pointer; cb: FixedUInt; pcbRead: PFixedUInt): HResult; virtual; stdcall;
C++
virtual HRESULT __stdcall Read(void * pv, unsigned cb, System::PFixedUInt pcbRead);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TStreamAdapter |
Description
Implements the IStream
Read method.
Read reads up to cb bytes from the current position in the stream into the buffer pointed to by pv. pcbRead returns the number of bytes actually read.
Read returns S_OK if it successfully reads pcbRead bytes into the buffer. It returns STG_E_INVALIDPOINTER it can't read because pv is nil (Delphi) or NULL (C++). It returns S_FALSE if the read operation fails for any other reason.