ReactOS  0.4.15-dev-3723-g8d70159
seh0028.c File Reference
#include <windows.h>
#include "seh.h"
Include dependency graph for seh0028.c:

Go to the source code of this file.

Functions

void addtwo (long First, long Second, long *Place)
 
int main ()
 

Variables

char test [] = "SEH0028.c"
 
int perfect
 

Function Documentation

◆ addtwo()

void addtwo ( long  First,
long  Second,
long Place 
)

Definition at line 11 of file seh0028.c.

11  {
12  RaiseException(EXCEPTION_INT_OVERFLOW, 0, /*no flags*/ 0, 0);
13  /* not executed due to exception being raised */
14  *Place = First + Second;
15  return;
16 }
WCHAR Second[]
Definition: FormatMessage.c:12
#define EXCEPTION_INT_OVERFLOW
Definition: winbase.h:321
WCHAR First[]
Definition: FormatMessage.c:11
VOID WINAPI RaiseException(IN DWORD dwExceptionCode, IN DWORD dwExceptionFlags, IN DWORD nNumberOfArguments, IN CONST ULONG_PTR *lpArguments OPTIONAL)
Definition: except.c:700

Referenced by main().

◆ main()

int main ( void  )

Definition at line 18 of file seh0028.c.

18  {
19  LONG Counter;
20 
21  Counter = 0;
22 
23  try {
24  /* set counter = 1 */
25  Counter += 1;
26  addtwo(0x7fff0000, 0x10000, &Counter);
27  }
29  /* 1==EXECUTE HANDLER after unwinding */
30  {
31  /* set counter = 2 */
32  Counter += 1;
33  }
34  endtry
35 
36  if (Counter != 2) {
37  printf("TEST 28 FAILED. Counter = %d\n\r", Counter);
38  return -1;
39  }
40 
41  return 0;
42 }
#define endtry
Definition: seh.h:24
#define STATUS_INTEGER_OVERFLOW
Definition: ntstatus.h:385
long LONG
Definition: pedump.c:60
void addtwo(long First, long Second, long *Place)
Definition: seh0028.c:11
#define except(x)
Definition: btrfs_drv.h:139
static LARGE_INTEGER Counter
Definition: clock.c:43
#define GetExceptionCode()
Definition: seh.h:27
#define printf
Definition: config.h:203

Variable Documentation

◆ perfect

int perfect

Definition at line 9 of file seh0028.c.

◆ test

char test[] = "SEH0028.c"

Definition at line 8 of file seh0028.c.