[ros-diffs] [sginsberg] 36515: - Implement EngSet/GetLastError
sginsberg at svn.reactos.org
sginsberg at svn.reactos.org
Thu Sep 25 20:15:36 CEST 2008
Author: sginsberg
Date: Thu Sep 25 13:15:35 2008
New Revision: 36515
URL: http://svn.reactos.org/svn/reactos?rev=36515&view=rev
Log:
- Implement EngSet/GetLastError
Modified:
branches/nwin32/subsystems/win32/win32k/eng/engerror.c
Modified: branches/nwin32/subsystems/win32/win32k/eng/engerror.c
URL: http://svn.reactos.org/svn/reactos/branches/nwin32/subsystems/win32/win32k/eng/engerror.c?rev=36515&r1=36514&r2=36515&view=diff
==============================================================================
--- branches/nwin32/subsystems/win32/win32k/eng/engerror.c [iso-8859-1] (original)
+++ branches/nwin32/subsystems/win32/win32k/eng/engerror.c [iso-8859-1] Thu Sep 25 13:15:35 2008
@@ -27,13 +27,39 @@
APIENTRY
EngSetLastError(IN ULONG iError)
{
- UNIMPLEMENTED;
+ PTEB Teb;
+
+ /* Get the TEB */
+ Teb = PsGetThreadTeb(PsGetCurrentThread());
+
+ /* Check if we have one */
+ if (Teb)
+ {
+ /* Set the error */
+ Teb->LastErrorValue = iError;
+ }
}
ULONG
APIENTRY
EngGetLastError(VOID)
{
- UNIMPLEMENTED;
- return 0;
+ PTEB Teb;
+ ULONG iError;
+
+ /* Assume success */
+ iError = NO_ERROR;
+
+ /* Get the TEB */
+ Teb = PsGetThreadTeb(PsGetCurrentThread());
+
+ /* Check if we have one */
+ if (Teb)
+ {
+ /* Get the error */
+ iError = Teb->LastErrorValue;
+ }
+
+ /* Return the error */
+ return iError;
}
More information about the Ros-diffs
mailing list