RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.WriteBinaryData Method

Stores a specifically named data value associated with the current key.

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

Call WriteBinaryData to store a data value associated with the current key. 

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteBinary. If Name does not exist, it is created. 

Buffer is a data buffer containing the data to store in the registry. BufSize indicates the size of Buffer.

Note: Data-value lengths are limited by available memory. Long values (more than 2048 bytes) should be stored as separate files, and those file names should be stored in the registry. Application elements such as icons, bitmaps, and executable files should be stored as separate files rather than as values in the registry.
If WriteBinaryData fails, an exception is raised, and the value is not written to the registry. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!