blob: 854e297dd420e3786d353f4e9d396d01cc882c60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{$mode objfpc}
{$h+}
program txmlreg;
uses xmlreg;
Var
S : String;
C : Cardinal;
A : Array[0..15] of byte;
begin
S:='SomeValue <>&';
For C:=0 to 15 do
A[C]:=C;
With TXmlRegistry.Create('test.xml') do
try
If SetKey('/my/very/nice/key',true) then
begin
Writeln('Set key.');
Writeln('Writing Carinal value');
SetValueData('Cardinal',dtdword,C,SizeOf(C));
Writeln('Writing string value');
SetValueData('String',dtString,S[1],length(S));
Writeln('Writing binary value');
SetValueData('Binary',dtBinary,A,SizeOf(A));
SetValueData('SecondCardinal',dtdword,C,SizeOf(C));
DeleteValue('SecondCardinal');
end;
finally
Free;
end;
end.
|