RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStreamAdapter.Write Method

Implements the IStream Write method.

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

Write writes up to cb bytes from the buffer pointed to by pv into the stream, starting at the current position. pcbWritten returns the number of bytes actually written. 

Write returns S_OK if it successfully writes pcbWritten bytes into the stream. It returns STG_E_INVALIDPOINTER it can't write because pv is nil. It returns STG_E_CANTSAVE if the write operation fails for any other reason. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!