1 // Copyright 2014 Idol Software, Inc.
3 // This file is part of Doctor Dump SDK.
5 // Doctor Dump SDK is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "DoctorDump.h"
24 #include "../../CommonLibs/Log/log.h"
32 void Init(LPCWSTR dbgHelpPath
);
37 MINIDUMP_EXCEPTION_INFORMATION
* pExceptInfo
,
39 MINIDUMP_TYPE DumpType
,
40 MINIDUMP_CALLBACK_INFORMATION
* pCallback
);
43 typedef BOOL (WINAPI
*fnMiniDumpWriteDump
)(
47 MINIDUMP_TYPE DumpType
,
48 CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam
,
49 CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam
,
50 CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam
);
53 CStringW m_dbgHelpPath
;
55 fnMiniDumpWriteDump m_pfnMiniDumpWriteDump
;
61 DumpFilter(bool& cancel
, DWORD saveOnlyThisThreadID
= 0);
63 operator MINIDUMP_CALLBACK_INFORMATION
*() { return &m_callback
; }
66 MINIDUMP_CALLBACK_INFORMATION m_callback
;
68 DWORD m_saveOnlyThisThreadID
;
70 BOOL
MinidumpCallback(
71 const PMINIDUMP_CALLBACK_INPUT CallbackInput
,
72 PMINIDUMP_CALLBACK_OUTPUT CallbackOutput
);
74 static BOOL CALLBACK
_MinidumpCallback(
76 const PMINIDUMP_CALLBACK_INPUT CallbackInput
,
77 PMINIDUMP_CALLBACK_OUTPUT CallbackOutput
);