ReactOS
0.4.15-dev-5615-gc3644fd
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
}
win32k.h
ERROR_SUCCESS
#define ERROR_SUCCESS
Definition:
deptool.c:10
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
EngSetLastError
VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition:
error.c:28
FASTCALL
#define FASTCALL
Definition:
nt_native.h:50
_In_
#define _In_
Definition:
ms_sal.h:308
Status
Status
Definition:
gdiplustypes.h:24
SetLastNtError
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition:
error.c:37
EngGetLastError
ULONG APIENTRY EngGetLastError(VOID)
Definition:
error.c:12
RtlNtStatusToDosError
ULONG NTAPI RtlNtStatusToDosError(IN NTSTATUS Status)
Definition:
error.c:96
_TEB
Definition:
compat.h:835
NtCurrentTeb
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition:
psfuncs.h:420
_TEB::LastErrorValue
ULONG LastErrorValue
Definition:
compat.h:843
ULONG
unsigned int ULONG
Definition:
retypes.h:1
void
Definition:
nsiface.idl:2306
APIENTRY
#define APIENTRY
Definition:
api.h:79
win32ss
gdi
eng
error.c
Generated on Mon Jan 30 2023 06:03:09 for ReactOS by
1.8.15