Shipwright/libultraship/libultraship/CrashHandler.h
louist103 c21b2e8f00
Crash Handler 2.0 (#1466)
* Linux side done

* Win V2. need to fix message box.

* Fix message box.
2022-09-26 19:54:25 -04:00

40 lines
538 B
C

#ifndef CRASH_HANDLER_H
#define CRASH_HANDLER_H
#include <stddef.h>
typedef void(*CrashHandlerCallback)(char*, size_t*);
#ifdef __cplusplus
extern "C" {
#endif
void CrashHandler_Init(CrashHandlerCallback callback);
#ifdef __cplusplus
}
#endif
#ifdef _WIN32
#include <windows.h>
#include <DbgHelp.h>
#include <inttypes.h>
#include <excpt.h>
#ifdef __cplusplus
extern "C" {
#endif
LONG seh_filter(struct _EXCEPTION_POINTERS* ex);
#ifdef __cplusplus
}
#endif
#pragma comment(lib, "Dbghelp.lib")
#endif
#endif // CRASH_HANDLER_H