- /* Time to compare creation time of both file & file1 */
- CopyPath[wcslen(TempPath) - 1] = 0;
-
- /* Open file and get its creation time */
- hFile = CreateFileW(CopyPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (hFile == INVALID_HANDLE_VALUE)
- {
- fprintf(stderr, "Failed to open file\n");
- return GetLastError();
- }
- if (GetFileTime(hFile, &FileTime, NULL, NULL) == FALSE)
- {
- fprintf(stderr, "Failed to read creation time\n");
- CloseHandle(hFile);
- return GetLastError();
- }
- CloseHandle(hFile);
-