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[] = "seh0055.c"; 9 10 LONG Echo(LONG Value) { return Value; } 11 12 int main() { 13 LONG Counter; 14 15 Counter = 0; 16 17 try { 18 try { 19 if (Echo(Counter) == Counter) { 20 Counter += 3; 21 leave; 22 23 } else { 24 Counter += 100; 25 } 26 } 27 finally { 28 if (abnormal_termination() == FALSE) { 29 Counter += 5; 30 leave; 31 } 32 } 33 endtry 34 35 Counter += 100; 36 } 37 finally { 38 if (abnormal_termination() == FALSE) { 39 Counter += 5; 40 } 41 } 42 endtry 43 44 if (Counter != 13) { 45 printf("TEST 55 FAILED, Counter = %d\n", Counter); 46 return -1; 47 } 48 49 return 0; 50 } 51