2019-09-18 22:27:46 +00:00
|
|
|
|
|
|
|
#define NEED_DBGHELP_H
|
|
|
|
#define NEED_MMSYSTEM_H
|
|
|
|
#include "windows_inc.h"
|
|
|
|
|
2019-09-21 22:10:48 +00:00
|
|
|
BEGIN_RR_NS
|
|
|
|
|
2019-09-18 22:27:46 +00:00
|
|
|
// based on dbghelp.h
|
|
|
|
typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
|
|
|
|
CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
|
|
|
CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
|
|
|
|
CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam
|
|
|
|
);
|
|
|
|
|
|
|
|
class MiniDumper
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static LPCSTR m_szAppName;
|
|
|
|
|
|
|
|
static LONG WINAPI TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo );
|
|
|
|
|
|
|
|
public:
|
|
|
|
MiniDumper( LPCSTR szAppName );
|
|
|
|
};
|
2019-09-21 22:10:48 +00:00
|
|
|
|
|
|
|
END_RR_NS
|