mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 04:11:30 +00:00
40 lines
653 B
C
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));
|
|
}
|