Hola Lepuke.
No sé cuál es la finalidad que buscas, pero para pasar el contenido del archivo a un
TMemo podes hacer:
Código Delphi
[-]
...
var
Buffer: array [0 .. 1023] of Char;
str: string;
begin
Memo1.Clear;
str := ExtractFilePath(Application.ExeName) + 'test.exe';
with TFileStream.Create(str, fmOpenRead) do
try
Memo1.Lines.BeginUpdate;
SetLength(str, 1024);
while Position < Size do
begin
Read(Buffer, 1024);
StrCopy(PChar(str), Buffer);
Memo1.Lines.Add(str);
end;
finally
Memo1.Lines.EndUpdate;
Free;
end;
end;
Saludos
