看这个
原版的Delphi7的帮助,最权威了
Retrieves a binary value from a specified data value associated with the current key.
Delphi syntax:
function ReadBinaryData(const Name: String; var Buffer; BufSize: Integer): Integer;
C++ syntax:
int __fastcall ReadBinaryData(const AnsiString Name, void *Buffer, int BufSize);
Description
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.