- Implement RtlGetLastNtStatus, RtlGetLastWin32Error, RtlRestoreLastWin32Error, RtlSe...
[reactos.git] / reactos / lib / rtl / error.c
index 5a6e1ce..7765d67 100644 (file)
@@ -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 */