RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TResourceStream.Write Method

Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application.

Pascal
function Write(const Buffer; Count: Longint): Longint; override;
C++
virtual __fastcall Longint Write(const  Buffer, Longint Count);

Applications should not use a TResourceStream to write the resources of the running application. Write overrides the inherited method to raise an EStreamError exception when an application tries to write to the application's resources. 

As all other data-writing methods of TResourceStream (WriteBuffer, WriteComponent) call Write to do the actual writing, calling any of the data-writing methods of TResourceStream will raise an exception. 

 

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