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[] = "SEH0001.c"; 9 10 int main() { 11 long Counter; 12 13 Counter = 0; 14 15 try { 16 Counter += 1; 17 } 18 finally { 19 if (abnormal_termination() == 0) { 20 Counter += 1; 21 } 22 } 23 endtry 24 25 if (Counter != 2) { 26 printf("TEST 1 FAILED. Counter = %d\n\r", Counter); 27 return -1; 28 } 29 return 0; 30 } 31