Commit 35ae4703 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard
Browse files

ntdll: Introduce RtlSetLastWin32Error for unixlibs that additionally sets 32-bit error on wow64.

parent 1795fd7a
......@@ -2390,3 +2390,19 @@ ULONG WINAPI RtlNtStatusToDosError( NTSTATUS status )
return map_status( status );
}
/**********************************************************************
* RtlSetLastWin32Error (ntdll.so)
*/
void WINAPI RtlSetLastWin32Error( DWORD err )
{
TEB *teb = NtCurrentTeb();
#ifdef _WIN64
if (teb->WowTebOffset)
{
TEB32 *teb32 = (TEB32 *)((char *)teb + teb->WowTebOffset);
teb32->LastErrorValue = err;
}
#endif
teb->LastErrorValue = err;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment