1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5/*============================================================
6**
7** Source: terminateprocess/test1/terminateprocess.c
8**
9** Purpose: Test to see if TerminateProcess will
10** terminate the current process.
11**
12** Dependencies: GetCurrentProcess
13**
14**
15**=========================================================*/
16
17#include <palsuite.h>
18
19INT __cdecl main( int argc, char **argv )
20{
21
22 HANDLE hProcess;
23
24 if(0 != (PAL_Initialize(argc, argv)))
25 {
26 return (FAIL);
27 }
28
29 hProcess = GetCurrentProcess();
30
31 Trace ("Testing TerminateProcess function.\n");
32
33 if ( 0 == ( TerminateProcess ( hProcess, PASS ) ) )
34 {
35 Fail ("TerminateProcess failed.\n");
36 }
37
38 PAL_TerminateEx(FAIL);
39 return (FAIL);
40
41}
42