Author: tkreuzer
Date: Sat Dec 25 10:37:55 2010
New Revision: 50138
URL:
http://svn.reactos.org/svn/reactos?rev=50138&view=rev
Log:
[WIN32K]
Fix EngGetLastError and EngSetLastError
Modified:
trunk/reactos/subsystems/win32/win32k/eng/error.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/error.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/error.c [iso-8859-1] Sat Dec 25 10:37:55
2010
@@ -5,22 +5,28 @@
/*
* @implemented
+ *
http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
*/
ULONG
APIENTRY
-EngGetLastError ( VOID )
+EngGetLastError(VOID)
{
- //
www.osr.com/ddk/graphics/gdifncs_3non.htm
- return GetLastNtError();
+ PTEB pTeb = NtCurrentTeb();
+ if (pTeb)
+ return NtCurrentTeb()->LastErrorValue;
+ else
+ return ERROR_SUCCESS;
}
/*
* @implemented
+ *
http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
*/
VOID
APIENTRY
-EngSetLastError ( IN ULONG iError )
+EngSetLastError(IN ULONG iError)
{
- //
www.osr.com/ddk/graphics/gdifncs_95m0.htm
- SetLastNtError ( iError );
+ PTEB pTeb = NtCurrentTeb();
+ if (pTeb)
+ pTeb->LastErrorValue = iError;
}