mirror of
https://github.com/reactos/reactos.git
synced 2026-06-05 03:02:59 +08:00
URLs are getting old. We have to update URLs for documentation purpose. JIRA issue: CORE-19963 - Refresh old URLs. - Add " (DEAD_LINK)" labels to dead links. - Use MS Learn links rather than MSDN ones. - Some dead links revived by Web Archive. - Don't change Wine Tests and Wine Sync. - Don't change 3rd party libraries. - Don't append "redirected" labels.
35 lines
646 B
C
35 lines
646 B
C
#include <win32k.h>
|
|
|
|
/*
|
|
* @implemented
|
|
* https://learn.microsoft.com/en-us/windows/win32/api/winddi/nf-winddi-enggetlasterror
|
|
*/
|
|
ULONG
|
|
APIENTRY
|
|
EngGetLastError(VOID)
|
|
{
|
|
PTEB pTeb = NtCurrentTeb();
|
|
return (pTeb ? pTeb->LastErrorValue : ERROR_SUCCESS);
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
* https://learn.microsoft.com/en-us/windows/win32/api/winddi/nf-winddi-engsetlasterror
|
|
* 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));
|
|
}
|