1 // Copyright (c) Microsoft. All rights reserved. 2 // Licensed under the MIT license. See LICENSE file in the project root for 3 // full license information. 4 5 #include <windows.h> 6 #include "seh.h" 7 8 char test[] = "SEH0056.c"; 9 int perfect; 10 11 int main() { 12 LONG Counter; 13 14 Counter = 0; 15 16 try { 17 Counter += 1; 18 RaiseException(EXCEPTION_INT_OVERFLOW, 0, /* no flags */ 19 0, NULL); 20 } 21 except(Counter) { 22 try { 23 Counter += 3; 24 } 25 finally { 26 if (abnormal_termination() == FALSE) { 27 Counter += 5; 28 } 29 } 30 endtry 31 } 32 endtry 33 34 if (Counter != 9) { 35 printf("TEST 56 FAILED. Counter = %d\n\r", Counter); 36 return -1; 37 } 38 39 return 0; 40 } 41