X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Frtl%2Ferror.c;h=7765d67361622b01c80d4f9eadfa3e850d3c44d3;hp=5a6e1ce42d20dd615f93455546833bedc24033a4;hb=feb76365e78ff7d31da3514a053c18703039269b;hpb=df616c9b3b374f8d5a483d6ce50f3aaae1f08f0a diff --git a/reactos/lib/rtl/error.c b/reactos/lib/rtl/error.c index 5a6e1ce42d2..7765d673616 100644 --- a/reactos/lib/rtl/error.c +++ b/reactos/lib/rtl/error.c @@ -991,4 +991,44 @@ RtlNtStatusToPsxErrno(IN NTSTATUS Status) return -1; /* generic POSIX error */ } + +/* + * @implemented + */ +NTSTATUS STDCALL +RtlGetLastNtStatus(VOID) +{ + return NtCurrentTeb()->LastStatusValue; +} + + +/* + * @implemented + */ +ULONG STDCALL +RtlGetLastWin32Error(VOID) +{ + return NtCurrentTeb()->LastErrorValue; +} + + +/* + * @implemented + */ +VOID STDCALL +RtlSetLastWin32Error(IN ULONG Error) +{ + NtCurrentTeb()->LastErrorValue = Error; +} + + +/* + * @implemented + */ +VOID STDCALL +RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status) +{ + NtCurrentTeb()->LastErrorValue = RtlNtStatusToDosError(Status); +} + /* EOF */