mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
bf7e7c2383
- Remove a useless debug.h include. - Use the initialized pTeb pointer. - Remove a useless else. - Add a SAL2 annotation.
34 lines
606 B
C
34 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));
|
|
}
|