Leer archivo de Texto
Publicado por Johanna (2 intervenciones) el 29/08/2003 18:54:49
Hola amigos foreros, tengo el siguiente problema, este ejemplo lo saque de la ayuda de delphi 6, pero al ejecutarlo me da un error en la instrucción SHOWMESSAGE, y estoy segura de q el archivo existe
Como puedo mostrar o leer lo q tiene el archivo???
var
iFileHandle: Integer;
iFileLength: Integer;
iBytesRead: Integer;
Buffers: Pchar;
begin
iFileHandle := FileOpen('Texto.txt', fmOpenReadWrite);
iFileLength := FileSeek(iFileHandle,0,2);
FileSeek(iFileHandle,0,0);
iBytesRead := FileRead(iFileHandle, Buffers, iFileLength);
FileClose(iFileHandle);
ShowMessage(buffers);
End;
Como puedo mostrar o leer lo q tiene el archivo???
var
iFileHandle: Integer;
iFileLength: Integer;
iBytesRead: Integer;
Buffers: Pchar;
begin
iFileHandle := FileOpen('Texto.txt', fmOpenReadWrite);
iFileLength := FileSeek(iFileHandle,0,2);
FileSeek(iFileHandle,0,0);
iBytesRead := FileRead(iFileHandle, Buffers, iFileLength);
FileClose(iFileHandle);
ShowMessage(buffers);
End;
Valora esta pregunta


0