reactos/win32ss/gdi/eng/error.c
Amine Khaldi 527f2f9057 [SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments.

svn path=/branches/shell-experiments/; revision=61927
2014-02-02 19:37:27 +00:00

40 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));
}