Ich habe folgenden Code aus Luckie's Hexloader.
Ich würde da gerne Irgendwo einen opendialog (
VCL) einbauen, anstelle des
Delphi-Quellcode:
fs := TFileStream.Create('G:\MP3s\Beatles\Beatles - Blue Jay Way.mp3',
fmOpenRead);
Hier die komplette Prozedur
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
fs: TFileStream;
Buffer: TMyByteArray;
BytesRead: Longint;
s: string;
i: Int64;
HexLength: Integer;
begin
i := 0;
SetLength(Buffer, BUFFERSIZE);
fs := TFileStream.Create('G:\MP3s\Beatles\Beatles - Blue Jay Way.mp3',
fmOpenRead);
HexLength := Length(HEXPREFIX) + 2 + Length(HEXSUFFIX);
SetLength(s, fs.size * HexLength);
Progressbar1.Max := fs.Size div BUFFERSIZE;
try
repeat
BytesRead := fs.Read(Buffer[0], BUFFERSIZE);
Move(BuffToHex(Buffer)[1], s[i * (HexLength * BUFFERSIZE) + 1],
HexLength * BytesRead);
Inc(i);
Progressbar1.StepIt;
Application.ProcessMessages;
until BytesRead < BUFFERSIZE;
Memo1.Text := s;
finally
FreeAndNil(fs);
end;
end;
Danke schonmal
Jab