mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 05:22:59 +00:00
39 lines
653 B
C
39 lines
653 B
C
#include <win32k.h>
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
/*
|
|
* @implemented
|
|
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
|
|
*/
|
|
ULONG
|
|
APIENTRY
|
|
EngGetLastError(VOID)
|
|
{
|
|
PTEB pTeb = NtCurrentTeb();
|
|
if (pTeb)
|
|
return NtCurrentTeb()->LastErrorValue;
|
|
else
|
|
return ERROR_SUCCESS;
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
* http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
|
|
*/
|
|
VOID
|
|
APIENTRY
|
|
EngSetLastError(_In_ ULONG iError)
|
|
{
|
|
PTEB pTeb = NtCurrentTeb();
|
|
if (pTeb)
|
|
pTeb->LastErrorValue = iError;
|
|
}
|
|
|
|
VOID
|
|
FASTCALL
|
|
SetLastNtError(NTSTATUS Status)
|
|
{
|
|
EngSetLastError(RtlNtStatusToDosError(Status));
|
|
}
|