procedure TForm2.Button1Click(Sender:
TObject);
var
I: Integer;
B: Byte;
S: String;
begin
with TMemoryStream.Create do
begin
LoadFromFile('c:\windows\notepad.exe');
for i := 1 to Size do
begin
ReadBuffer(B, 1);
S := S + IntToHex(Trunc(B), 2) + '
';
if ( i mod 16 ) = 0 then S := S + #13#10;
end;
Free;
end;
Memo1.Text := S;
end;
No comments:
Post a Comment