[Contents] [Parent chapter] [Previous chapter] [Next chapter]

ReadBinary

Reads binary data from the file.

Class
TTextIniFile

Declaration

function ReadBinary(const Section, Ident: string; 
                                Buffer: Pointer; 
                                Count: LongInt): LongInt;

Visibility
public

Description
Reads binary data from the file. A maximum of Count bytes is read and written to the given buffer. The function returns the number of bytes actually contained in the desired identifier, that is, the buffer size needed for reading all data. If either the given section or the given identifier does not exist, 0 is returned. If a conversion error occurs (since the function expects hex-coded, comma-separated values), -1 is returned.

See
WriteBinary