var reg:Tregistry;
buf: array[0..3] of char;
i:integer;
begin
for i:=0 to 3 do
buf:=#0;
reg:=Tregistry.Create
reg.RootKey :=HKEY_LOCAL_MACHINE;
if reg.OpenKey('software/testKey',true) then
reg.WriteBinaryData('bint',buf,SizeOf(buf));
reg.CloseKey
reg.Free