xref: /reactos/sdk/lib/ucrt/misc/seterrm.cpp (revision 04e0dc4a)
1*04e0dc4aSTimo Kreuzer /***
2*04e0dc4aSTimo Kreuzer *seterrm.c - Set mode for handling critical errors
3*04e0dc4aSTimo Kreuzer *
4*04e0dc4aSTimo Kreuzer *       Copyright (c) Microsoft Corporation. All rights reserved.
5*04e0dc4aSTimo Kreuzer *
6*04e0dc4aSTimo Kreuzer *Purpose:
7*04e0dc4aSTimo Kreuzer *       Defines signal() and raise().
8*04e0dc4aSTimo Kreuzer *
9*04e0dc4aSTimo Kreuzer *******************************************************************************/
10*04e0dc4aSTimo Kreuzer 
11*04e0dc4aSTimo Kreuzer #include <corecrt_internal.h>
12*04e0dc4aSTimo Kreuzer #include <stdlib.h>
13*04e0dc4aSTimo Kreuzer 
14*04e0dc4aSTimo Kreuzer /***
15*04e0dc4aSTimo Kreuzer *void _seterrormode(mode) - set the critical error mode
16*04e0dc4aSTimo Kreuzer *
17*04e0dc4aSTimo Kreuzer *Purpose:
18*04e0dc4aSTimo Kreuzer *
19*04e0dc4aSTimo Kreuzer *Entry:
20*04e0dc4aSTimo Kreuzer *   int mode - error mode:
21*04e0dc4aSTimo Kreuzer *
22*04e0dc4aSTimo Kreuzer *               0 means system displays a prompt asking user how to
23*04e0dc4aSTimo Kreuzer *               respond to the error. Choices differ depending on the
24*04e0dc4aSTimo Kreuzer *               error but may include Abort, Retry, Ignore, and Fail.
25*04e0dc4aSTimo Kreuzer *
26*04e0dc4aSTimo Kreuzer *               1 means the call system call causing the error will fail
27*04e0dc4aSTimo Kreuzer *               and return an error indicating the cause.
28*04e0dc4aSTimo Kreuzer *
29*04e0dc4aSTimo Kreuzer *Exit:
30*04e0dc4aSTimo Kreuzer *   none
31*04e0dc4aSTimo Kreuzer *
32*04e0dc4aSTimo Kreuzer *Exceptions:
33*04e0dc4aSTimo Kreuzer *
34*04e0dc4aSTimo Kreuzer *******************************************************************************/
35*04e0dc4aSTimo Kreuzer 
_seterrormode(int const mode)36*04e0dc4aSTimo Kreuzer extern "C" void __cdecl _seterrormode(int const mode)
37*04e0dc4aSTimo Kreuzer {
38*04e0dc4aSTimo Kreuzer     SetErrorMode(mode);
39*04e0dc4aSTimo Kreuzer }
40