comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
Your Ad Here
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...


 Up
  GetFileTime on usb driver return 0 and does not fail         


Author: Nuno
Date: May 6, 2008 09:48

Hello,

I'm trying to obtain the last write time on a usb drive (example e:\)
with a FAT file system, i'm using the GetFileTime(...) function,
example:

FILETIME ftCreate, ftAccess, ftWrite;

//reset the default return value:
ftWrite.dwHighDateTime=0;
ftWrite.dwLowDateTime=0;

HANDLE hFile = CreateFile(_T("e:\\"),
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);

// Retrieve the file times for the file.
BOOL bRet = GetFileTime(hFile, &ftCreate, &ftAccess, &ftWrite);

CloseHandle(hFile);
Show full article (0.88Kb)
3 Comments
Your Ad Here