RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.ReadBinaryData Method

Retrieves a binary value from a specified data value associated with the current key.

Pascal
function ReadBinaryData(const Name: string; var Buffer; BufSize: Integer): Integer;
C++
__fastcall int ReadBinaryData(const AnsiString Name,  Buffer, int BufSize);

Call ReadBinaryData to read a binary value from a specified data value associated with the current key. Name is the name of the data value to read. Buffer is the application variable into which to read the registry data. Buffer must be large enough to hold all of the data returned. BufSize specifies the size of Buffer. 

If successful, ReadBinaryData writes the requested data into Buffer and returns the number of bytes written. If the Registry entry contains a known type (such as a string), ReadBinaryData raises an exception.

Note: Binary data is typically a complex data structure (a record in Delphi or struct in C++). It might also be an icon or a bitmap although Microsoft recommends against storing graphics objects in the registry for performance reasons.
 

 

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