RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomIniFile.ReadBinaryStream Method

Retrieves a binary value from the ini file.

Pascal
function ReadBinaryStream(const Section: string; const Name: string; Value: TStream): Integer; virtual;
C++
virtual __fastcall int ReadBinaryStream(const AnsiString Section, const AnsiString Name, TStream Value);

Call ReadBinaryStream to read a binary value into a specified stream. After reading the binary value, which it converts from a series of hexadecimal characters, from the ini file into the current position of the stream, ReadBinaryStream returns the number of bytes written to the stream. If the stream is a memory stream (TMemoryStream or one of its descendants), the stream is left positioned to the same byte as it was before the call to ReadBinaryStream (immediately before the new binary value). 

Section is the section that contains the desired key. 

Name is the key under which the binary data is stored. 

Value is a stream to which the binary value is written.

Note: When used with a Windows .ini file, ReadBinaryStream is limited to 1023 characters,
 

 

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