ReactOS
0.4.15-dev-8614-gbc76250
error.c
Go to the documentation of this file.
1
#include <
win32k.h
>
2
3
/*
4
* @implemented
5
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
6
*/
7
ULONG
8
APIENTRY
9
EngGetLastError
(
VOID
)
10
{
11
PTEB
pTeb =
NtCurrentTeb
();
12
return
(pTeb ? pTeb->
LastErrorValue
:
ERROR_SUCCESS
);
13
}
14
15
/*
16
* @implemented
17
* http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
18
* Win: UserSetLastError
19
*/
20
VOID
21
APIENTRY
22
EngSetLastError
(
_In_
ULONG
iError)
23
{
24
PTEB
pTeb =
NtCurrentTeb
();
25
if
(pTeb)
26
pTeb->
LastErrorValue
= iError;
27
}
28
29
VOID
30
FASTCALL
31
SetLastNtError
(
_In_
NTSTATUS
Status
)
32
{
33
EngSetLastError
(
RtlNtStatusToDosError
(
Status
));
34
}
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:9
SetLastNtError
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition:
error.c:31
EngSetLastError
VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition:
error.c:22
win32ss
gdi
eng
error.c
Generated on Sat Sep 7 2024 06:14:25 for ReactOS by
1.9.6