Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry WriteBufferData

Status
Not open for further replies.

GeoEnaru

Programmer
Mar 15, 2004
7
RO
How can I write in registry a REG_Binary type?
I assume that it can be done with writeBufferData, but I don't know to use it.
 
Hi Geo,

should be something like this (untested though)
Code:
function WriteRegBinary(Key: HKEY; Name: string; const Buffer; BufSize: Integer) : boolean;
begin 
  try
   Result:= RegSetValueEx(Key, PChar(Name), nil, REG_BINARY, PByte(Buffer),
         BufSize) = ERROR_SUCCESS; 
  except
    result := False;
  end;
end;

HTH,
Daddy

--------------------------------------
What You See Is What You Get
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top