ReactOS 0.4.15-dev-7918-g2a2556c
seh0008.c File Reference
#include <windows.h>
#include "seh.h"
Include dependency graph for seh0008.c:

Go to the source code of this file.

Functions

void rtlRaiseStatus (DWORD Status)
 
int main ()
 

Variables

char test [] = "SEH0008.c"
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 15 of file seh0008.c.

15 {
17
18 Counter = 0;
19
20 try {
21 Counter += 1;
22 /* raise exception */
23 RaiseException(EXCEPTION_ACCESS_VIOLATION, 0, /*no flags*/ 0, 0);
24 }
26 /*
27 * if correct exeception (EXECIUTE HANDLER (1) else
28 * CONTINUE SEARCH (0)). this test should execute handler
29 */
30 {
31 Counter += 1;
32 }
33 endtry
34
35 if (Counter != 2) {
36 printf("TEST 8 FAILED. Counter = %d\n\r", Counter);
37 return -1;
38 }
39
40 return 0;
41}
#define except(x)
Definition: btrfs_drv.h:136
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
#define printf
Definition: freeldr.h:93
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
long LONG
Definition: pedump.c:60
#define endtry
Definition: seh.h:24
#define GetExceptionCode()
Definition: seh.h:27
static LARGE_INTEGER Counter
Definition: clock.c:43
#define EXCEPTION_ACCESS_VIOLATION
Definition: winbase.h:311

◆ rtlRaiseStatus()

void rtlRaiseStatus ( DWORD  Status)

Definition at line 10 of file seh0008.c.

10 {
11 RaiseException(Status, 0, /*no flags*/ 0, 0);
12 return;
13}
Status
Definition: gdiplustypes.h:25

Variable Documentation

◆ test

char test[] = "SEH0008.c"

Definition at line 8 of file seh0008.c.