25 lines
982 B
C
25 lines
982 B
C
// Native user-mode exception runtime declarations shared by applications and personalities.
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <ntlite/syscall.h>
|
|
|
|
#if defined(NTL_EXCEPTION_EXPORTS)
|
|
#define NTL_EXCEPTION_API __declspec(dllexport)
|
|
#else
|
|
#define NTL_EXCEPTION_API
|
|
#endif
|
|
|
|
#define NTL_EXCEPTION_CONTINUE_EXECUTION ((int)SYS_EXCEPTION_DISPOSITION_CONTINUE_EXECUTION)
|
|
#define NTL_EXCEPTION_CONTINUE_SEARCH ((int)SYS_EXCEPTION_DISPOSITION_CONTINUE_SEARCH)
|
|
#define NTL_EXCEPTION_TERMINATE_PROCESS ((int)SYS_EXCEPTION_DISPOSITION_TERMINATE_PROCESS)
|
|
|
|
typedef int (*NTL_EXCEPTION_HANDLER)(SYS_EXCEPTION_RECORD* record,
|
|
SYS_USER_CONTEXT* context,
|
|
void* userContext);
|
|
|
|
NTL_EXCEPTION_API uint32_t NtlInitializeExceptionRuntime(void);
|
|
NTL_EXCEPTION_API void* NtlAddExceptionHandler(int first, NTL_EXCEPTION_HANDLER handler, void* context);
|
|
NTL_EXCEPTION_API uint32_t NtlRemoveExceptionHandler(void* handle);
|