26 lines
1022 B
C
26 lines
1022 B
C
// Native user-mode exception runtime declarations shared by applications and personalities.
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.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 ((uint32_t)SYS_EXCEPTION_DISPOSITION_CONTINUE_EXECUTION)
|
|
#define NTL_EXCEPTION_CONTINUE_SEARCH ((uint32_t)SYS_EXCEPTION_DISPOSITION_CONTINUE_SEARCH)
|
|
#define NTL_EXCEPTION_TERMINATE_PROCESS ((uint32_t)SYS_EXCEPTION_DISPOSITION_TERMINATE_PROCESS)
|
|
|
|
typedef uint32_t (*NTL_EXCEPTION_HANDLER)(SYS_EXCEPTION_RECORD* record,
|
|
SYS_USER_CONTEXT* context,
|
|
void* userContext);
|
|
|
|
NTL_EXCEPTION_API KSTATUS NtlInitializeExceptionRuntime(void);
|
|
NTL_EXCEPTION_API void* NtlAddExceptionHandler(bool first, NTL_EXCEPTION_HANDLER handler, void* context);
|
|
NTL_EXCEPTION_API KSTATUS NtlRemoveExceptionHandler(void* handle);
|