Ver Mensaje Individual
  #4  
Antiguo 04-06-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Cool Ok

Siendo así, entonces más útil creo que es éste código no?

Código Delphi [-]
var
 hFile: Cardinal;
 CreationTime, LastAccessTime, LastWriteTime: TFileTime;
 SystemTime: TSystemTime;
begin
 hFile := CreateFile('c:\ntldr', GENERIC_READ, FILE_SHARE_READ + FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0);
 if hFile <> INVALID_HANDLE_VALUE then
  begin
   GetFileTime(hFile, @CreationTime, @LastAccessTime, @LastWriteTime);
   CloseHandle(hFile);
   FileTimeToSystemTime(LastAccessTime, SystemTime);
   Caption := DateTimeToStr(SystemTimeToDateTime(SystemTime))
  end
 else
  Caption := 'Error al acceder al archivo!';
end;

Espero te sirva, Suerte!
Responder Con Cita