summaryrefslogtreecommitdiffhomepage
path: root/include/ntapi/nt_exception.h
blob: 8465d7c571fa2675a6f2d7d5356e1426019475f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _NT_EXCEPTION_H_
#define _NT_EXCEPTION_H_

#include "nt_abi.h"
#include "nt_object.h"
#include "nt_thread.h"

/* limits */
#define NT_EXCEPTION_MAX_PARAMS		(0x0F)

typedef enum _nt_exception_disposition {
	NT_EXCEPTION_CONTINUE_EXECUTION,
	NT_EXCEPTION_CONTINUE_SEARCH,
	NT_EXCEPTION_NESTED_EXCEPTION,
	NT_EXCEPTION_COLLIDED_UNWIND
} nt_exception_disposition;

typedef struct _nt_exception_record {
	uint32_t			exception_code;
	uint32_t			exception_flags;
	struct _nt_exception_record *	exception_record;
	void *				exception_address;
	uint32_t			number_of_params;
	uintptr_t			exception_information[NT_EXCEPTION_MAX_PARAMS];
} nt_exception_record;

typedef int32_t __stdcall ntapi_zw_raise_exception(
	__in	nt_exception_record *	exception_record,
	__in	nt_thread_context *	context,
	__in	unsigned char		search_frames);

typedef int32_t __stdcall ntapi_zw_continue(
	__in	nt_thread_context *	context,
	__in	unsigned char		test_alert);

#endif