mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
bf7e7c2383
- Remove a useless debug.h include. - Use the initialized pTeb pointer. - Remove a useless else. - Add a SAL2 annotation.
35 lines
606 B
C
35 lines
606 B
C
#include <win32k.h>
|
|
|
|
/*
|
|
* @implemented
|
|
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
|
|
*/
|
|
ULONG
|
|
APIENTRY
|
|
EngGetLastError(VOID)
|
|
{
|
|
PTEB pTeb = NtCurrentTeb();
|
|
return (pTeb ? pTeb->LastErrorValue : ERROR_SUCCESS);
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
* http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
|
|
* Win: UserSetLastError
|
|
*/
|
|
VOID
|
|
APIENTRY
|
|
EngSetLastError(_In_ ULONG iError)
|
|
{
|
|
PTEB pTeb = NtCurrentTeb();
|
|
if (pTeb)
|
|
pTeb->LastErrorValue = iError;
|
|
}
|
|
|
|
VOID
|
|
FASTCALL
|
|
SetLastNtError(_In_ NTSTATUS Status)
|
|
{
|
|
EngSetLastError(RtlNtStatusToDosError(Status));
|
|
}
|