This commit is contained in:
朱子楚\zhuzi 2024-01-04 18:49:06 +08:00
parent 9d47c30a6b
commit 5ea480afcb

View File

@ -51,8 +51,7 @@ BOOL CALLBACK MyMiniDumpCallback(PVOID, const PMINIDUMP_CALLBACK_INPUT input, PM
} }
void WriteDump(EXCEPTION_POINTERS* exp, const std::wstring& path) { void WriteDump(EXCEPTION_POINTERS* exp, const std::wstring& path) {
HANDLE h = ::CreateFileW(path.c_str(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, CREATE_ALWAYS, HANDLE h = ::CreateFileW(path.c_str(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
FILE_ATTRIBUTE_NORMAL, NULL);
MINIDUMP_EXCEPTION_INFORMATION info; MINIDUMP_EXCEPTION_INFORMATION info;
info.ThreadId = ::GetCurrentThreadId(); info.ThreadId = ::GetCurrentThreadId();
info.ExceptionPointers = exp; info.ExceptionPointers = exp;