Hello,

I wonder how to get/set the time/date of a directory. I thought i could use:

invoke CreateFile, szFileName, GENERIC_READ + GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_DIRECTORY, NULL

mov hFile, eax

invoke GetFileTime, hFile, ADDR DateTime, ADDR DateTime, ADDR DateTime

invoke CloseHandle, hFile

but that gives me a file open error, so what is the right way to do it?

TIA
Posted on 2002-01-23 12:37:16 by Slash0r
PlatformSDK seems to indicate that you can, indeed, use CreateFile
to "open" a directory. Try using "0" for dwDesiredAccess and dwShareMode,
OPEN_EXISTING for dwCreationDisposition, 0 for dwFlagsAndAttributes,
and see if that works.
Posted on 2002-01-23 12:44:21 by f0dder