Einzelnen Beitrag anzeigen

Tiemo

Registriert seit: 12. Jul 2004
19 Beiträge
 
#5

Re: "FileSetDate" auch für Ordner?

  Alt 5. Jun 2006, 14:53
Zitat von himitsu:
Da stellt sich mir nur eine Frage ... bei mir ging es (bei meinen Tests damals) ... was hat FILE_FLAG_BACKUP_SEMANTICS mit Verzeichnissen zu tun
Bei mir ging der o.g. Code nur für Files. Ich fand dann folgendes:

http://thehacker.host.sk/addtime/addtimethread.html

Windows NT: You can obtain a handle to a directory by calling the CreateFile function with the FILE_FLAG_BACKUP_SEMANTICS flag set, as follows:

hDir = CreateFile (
DirName,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL
);

You can pass a directory handle to the following functions:
BackupRead
BackupSeek
BackupWrite
GetFileInformationByHandle
GetFileSize
GetFileTime
GetFileType
ReadDirectoryChangesW
SetFileTime
  Mit Zitat antworten Zitat