From: Alfred Agrell floating@muncher.se
This allows debuggers to tell them apart --- dlls/ntdll/error.c | 18 +++++++++++++++++- dlls/ntdll/ntdll.spec | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/error.c b/dlls/ntdll/error.c index 5412b19907c..6b914f226e5 100644 --- a/dlls/ntdll/error.c +++ b/dlls/ntdll/error.c @@ -109,7 +109,6 @@ DWORD WINAPI RtlGetLastWin32Error(void)
/*********************************************************************** * RtlSetLastWin32Error (NTDLL.@) - * RtlRestoreLastWin32Error (NTDLL.@) * * Set the per-thread error value. * @@ -124,6 +123,23 @@ void WINAPI RtlSetLastWin32Error( DWORD err ) NtCurrentTeb()->LastErrorValue = err; }
+/*********************************************************************** + * RtlRestoreLastWin32Error (NTDLL.@) + * + * Set the per-thread error value. + * Identical to the above; duplicated to allow debugger breakpoints to tell them apart. + * + * PARAMS + * err [I] The new error value to set + * + * RETURNS + * Nothing. + */ +void WINAPI RtlRestoreLastWin32Error( DWORD err ) +{ + NtCurrentTeb()->LastErrorValue = err; +} + /*********************************************************************** * RtlSetLastWin32ErrorAndNtStatusFromNtStatus (NTDLL.@) * diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 64fdb6fdb24..b3650d7113d 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -968,7 +968,7 @@ @ stdcall RtlRemoveVectoredExceptionHandler(ptr) @ stdcall RtlResetRtlTranslations(ptr) @ cdecl RtlRestoreContext(ptr ptr) -@ stdcall RtlRestoreLastWin32Error(long) RtlSetLastWin32Error +@ stdcall RtlRestoreLastWin32Error(long) @ stub RtlRevertMemoryStream @ stub RtlRunDecodeUnicodeString @ stub RtlRunEncodeUnicodeString