Jun 2, 2004 #1 GeoEnaru Programmer Joined Mar 15, 2004 Messages 7 Location 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.
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.
Jun 3, 2004 #2 whosrdaddy Vendor Joined Mar 11, 2003 Messages 4,231 Location BE 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 Upvote 0 Downvote
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