AnsiString s = "e:\\a.dat";//文件名
HANDLE file = ::CreateFile(s.c_str(),GENERIC_READ,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
FILETIME ftime;
SYSTEMTIME stime;
GetFileTime(file,0,0,&ftime);
FileTimeToSystemTime(&ftime,&stime);
//
SYSTEMTIME 结构
typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
HANDLE hFile, // identifies the file
LPFILETIME lpCreationTime, // address of creation time
LPFILETIME lpLastAccessTime, // address of last access time
LPFILETIME lpLastWriteTime // address of last write time //应该是这个吧
);