System.Win.Registry.TRegistry.ReadBinaryData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ReadBinaryData(const Name: string; var Buffer; BufSize: Integer): Integer;

C++

int __fastcall ReadBinaryData(const System::UnicodeString Name, void *Buffer, int BufSize);

Properties

Type Visibility Source Unit Parent
function public
System.Win.Registry.pas
System.Win.Registry.hpp
System.Win.Registry TRegistry

Description

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

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.

See Also