Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
127 lines (84 loc) · 2.49 KB

File metadata and controls

127 lines (84 loc) · 2.49 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*++
Module Name:
error.c
Abstract:
Implementation of Error management functions.
Revision History:
--*/
#include "pal/thread.hpp"
#include "pal/dbgmsg.h"
using namespace CorUnix;
SET_DEFAULT_DEBUG_CHANNEL(MISC);
/*++
Function:
SetErrorMode
The SetErrorMode function controls whether the system will handle the
specified types of serious errors, or whether the process will handle
them.
Parameters
uMode
[in] Specifies the process error mode. This parameter can be one or more of the following values.
Value Action
0 Use the system default, which is to display all error dialog boxes.
SEM_FAILCRITICALERRORS The system does not display the critical-error-handler message box. Instead,
the system sends the error to the calling process.
SEM_NOOPENFILEERRORBOX The system does not display a message box when it fails to find a file. Instead,
the error is returned to the calling process.
Return Values
The return value is the previous state of the error-mode bit flags.
--*/
UINT
PALAPI
SetErrorMode(
IN UINT uMode)
{
PERF_ENTRY(SetErrorMode);
ENTRY("SetErrorMode (uMode=%#x)\n", uMode);
LOGEXIT("SetErrorMode returns UINT 0\n");
PERF_EXIT(SetErrorMode);
return 0;
}
/*++
Function:
GetLastError
GetLastError
The GetLastError function retrieves the calling thread's last-error
code value. The last-error code is maintained on a per-thread
basis. Multiple threads do not overwrite each other's last-error code.
Parameters
This function has no parameters.
Return Values
The return value is the calling thread's last-error code
value. Functions set this value by calling the SetLastError
function. The Return Value section of each reference page notes the
conditions under which the function sets the last-error code.
--*/
DWORD
PALAPI
GetLastError(
VOID)
{
return CPalThread::GetLastError();
}
/*++
Function:
SetLastError
SetLastError
The SetLastError function sets the last-error code for the calling thread.
Parameters
dwErrCode
[in] Specifies the last-error code for the thread.
Return Values
This function does not return a value.
--*/
VOID
PALAPI
SetLastError(
IN DWORD dwErrCode)
{
CPalThread::SetLastError(dwErrCode);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.