+static int GetWinpeshlIniFileAttr(WinpeshlIniAttr *pAttr)\r
+{\r
+ HANDLE hFile;\r
+ SYSTEMTIME systime;\r
+\r
+ hFile = CreateFileA(WINPESHL_INI, FILE_READ_EA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);\r
+ if (hFile == INVALID_HANDLE_VALUE)\r
+ {\r
+ Log("Could not open the file<%s>, error:%u", WINPESHL_INI, GetLastError());\r
+ return 1;\r
+ }\r
+\r
+ pAttr->FileSize = (INT)GetFileSize(hFile, NULL);\r
+ GetFileTime(hFile, &pAttr->CreateTime, &pAttr->LastAccessTime, &pAttr->LastWriteTime);\r
+\r
+ FileTimeToSystemTime(&pAttr->LastWriteTime, &systime);\r
+ Log("Winpeshl.ini size:%d LastWriteTime:<%04u/%02u/%02u %02u:%02u:%02u.%03u>", \r
+ pAttr->FileSize,\r
+ systime.wYear, systime.wMonth, systime.wDay, \r
+ systime.wHour, systime.wMinute, systime.wSecond, \r
+ systime.wMilliseconds);\r
+\r
+ CloseHandle(hFile);\r
+ return 0;\r
+}\r