Ver Mensaje Individual
  #9  
Antiguo 19-02-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
procedure TForm1.Button2Click(Sender: TObject);
var hFile, Size, Count: Integer;  Buffer : Array [0..200] Of Char;
begin
 if OpenDialog1.Execute Then
  begin
   hFile := _lopen(PChar(OpenDialog1.FileName), OF_READ);
   if hFile = -1 then Exit;
   Size := GetFileSize(hFile, nil);
   while LongBool(Size) do
    begin
     Count := SizeOf(Buffer) - 1;
     if Size < Count then Count := Size;
     Dec(Size, _lread(hFile, @Buffer, Count));
     Buffer[Count] := #0;
     Memo2.Lines.Add(PChar(@Buffer));
    end;
  CloseHandle(hFile);
 end;
end;
Responder Con Cita