1
0
Fork 0

EXE: Fix potential conflict with time stamps (use milliseconds)

This commit is contained in:
Nukem 2015-07-14 00:22:26 -04:00
parent 423e320f0f
commit a9cf745961
1 changed files with 6 additions and 4 deletions

View File

@ -53,16 +53,18 @@ void CrashDumpCreate(EXCEPTION_POINTERS* ExceptionPointers)
wcscat_s(dumpDir, L"\\minidump");
CreateDirectoryW(dumpDir, nullptr);
// Append the name
SYSTEMTIME st = {0};
// Append the name with generated timestamp
SYSTEMTIME st;
GetLocalTime(&st);
swprintf_s(dumpFile, L"%ws\\dump-%02d%02d%04d_%02d%02d%02d.dmp", dumpDir,
swprintf_s(dumpFile, L"%ws\\dump-%02d%02d%04d_%02d%02d%02d%04d.dmp", dumpDir,
st.wDay,
st.wMonth,
st.wYear,
st.wHour,
st.wMinute,
st.wSecond);
st.wSecond,
st.wMilliseconds);
// Open the file
HANDLE fileHandle = CreateFileW(dumpFile, GENERIC_READ | GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);