ReactOS
0.4.15-dev-6052-g2626c72
error.c
Go to the documentation of this file.
1
#include <
win32k.h
>
2
3
#define NDEBUG
4
#include <debug.h>
5
6
/*
7
* @implemented
8
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
9
*/
10
ULONG
11
APIENTRY
12
EngGetLastError
(
VOID
)
13
{
14
PTEB
pTeb =
NtCurrentTeb
();
15
if
(pTeb)
16
return
NtCurrentTeb
()->LastErrorValue;
17
else
18
return
ERROR_SUCCESS
;
19
}
20
21
/*
22
* @implemented
23
* http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
24
* Win: UserSetLastError
25
*/
26
VOID
27
APIENTRY
28
EngSetLastError
(
_In_
ULONG
iError)
29
{
30
PTEB
pTeb =
NtCurrentTeb
();
31
if
(pTeb)
32
pTeb->
LastErrorValue
= iError;
33
}
34
35
VOID
36
FASTCALL
37
SetLastNtError
(
NTSTATUS
Status
)
38
{
39
EngSetLastError
(
RtlNtStatusToDosError
(
Status
));
40
}
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
ERROR_SUCCESS
#define ERROR_SUCCESS
Definition:
deptool.c:10
APIENTRY
#define APIENTRY
Definition:
api.h:79
Status
Status
Definition:
gdiplustypes.h:25
void
Definition:
nsiface.idl:2307
NtCurrentTeb
#define NtCurrentTeb
Definition:
iphlpapi_private.h:4
_In_
#define _In_
Definition:
ms_sal.h:308
FASTCALL
#define FASTCALL
Definition:
nt_native.h:50
RtlNtStatusToDosError
ULONG NTAPI RtlNtStatusToDosError(IN NTSTATUS Status)
Definition:
error.c:96
_TEB
Definition:
compat.h:836
_TEB::LastErrorValue
ULONG LastErrorValue
Definition:
compat.h:843
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
win32k.h
EngGetLastError
ULONG APIENTRY EngGetLastError(VOID)
Definition:
error.c:12
SetLastNtError
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition:
error.c:37
EngSetLastError
VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition:
error.c:28
win32ss
gdi
eng
error.c
Generated on Tue May 30 2023 06:13:16 for ReactOS by
1.9.6