Re: REG_BINARY
- From: Ryan Styles <Ryan@xxxxxxxxxx>
- Date: Tue, 04 Oct 2005 10:19:13 -0400
On 4 Oct 2005 06:45:15 -0700, "alanglloyd@xxxxxxx"
<alanglloyd@xxxxxxx> wrote:
Thank you very much for the help. I was totally off in trying to read
it with the code I had devised. This cleared things up a bunch.
Ryan
>Works OK for me - I put this binary data int
>HKCU\Software\AGLTest\GameScore and retrieved it with ...
>
>procedure TForm1.Button1Click(Sender: TObject);
>var
> Reg : TRegistry;
> GSByte : array[0..7] of byte;
> GSWord : array[0..3] of word absolute GSByte; // overlays GSByte in
>memory
> GSDWord : array[0..1] of DWord absolute GSByte; // overlays GSByte
>in memory
>begin
> Reg := TRegistry.Create;
> with Reg do begin
> RootKey := HKEY_CURRENT_USER;
> if OpenKey('Software\AGLTest', false) then begin
> ReadBinaryData('GameScore', GSByte, SizeOf(GSByte));
> Label1.Caption := Format('$%8.8x, $%8.8x', [GSDWord[0],
>GSDWord[1]]) + #13 +
> Format('$%4.4x, $%4.4x, $%4.4x, $%4.4x',
> [GSWord[0], GSWord[1], GSWord[2],
>GSword[3]]) + #13 +
> Format('$%2.2x, $%2.2x, $%2.2x, $%2.2x,
>$%2.2x, $%2.2x, $%2.2x, $%2.2x',
> [GSByte[0], GSByte[1], GSByte[2],
>GSByte[3],
> GSByte[4], GSByte[5], GSByte[6],
>GSByte[7]]);
>
> end; {if OpenKey('Software\AGLTest', false)}
> Free;
> end; {with Reg}
>end;
>
>... displaying it a two DWords, 4 Words oand 8 bytes.
>
>Alan Lloyd
.
- References:
- REG_BINARY
- From: Ryan Styles
- Re: REG_BINARY
- From: Nicholas Sherlock
- Re: REG_BINARY
- From: Ryan Styles
- Re: REG_BINARY
- From: alanglloyd@xxxxxxx
- REG_BINARY
- Prev by Date: Re: Problem with OnCalcFields() Event.
- Next by Date: Re: type compatibility / string operations (newbie)
- Previous by thread: Re: REG_BINARY
- Next by thread: Problem with OnCalcFields() Event.
- Index(es):