RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStreamAdapter.Read Method

Implements the IStream Read method.

Pascal
function Read(pv: Pointer; cb: Longint; pcbRead: PLongint): HResult; virtual; stdcall;
C++
virtual __fastcall __stdcall HRESULT Read(void * pv, Longint cb, PLongint pcbRead);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!