Fix EngGetLastError and EngSetLastError

svn path=/trunk/; revision=50138
This commit is contained in:
Timo Kreuzer 2010-12-25 10:37:55 +00:00
parent 184b70c1de
commit 54ee99abdb

View file

@ -5,22 +5,28 @@
/* /*
* @implemented * @implemented
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
*/ */
ULONG ULONG
APIENTRY APIENTRY
EngGetLastError(VOID) EngGetLastError(VOID)
{ {
// www.osr.com/ddk/graphics/gdifncs_3non.htm PTEB pTeb = NtCurrentTeb();
return GetLastNtError(); if (pTeb)
return NtCurrentTeb()->LastErrorValue;
else
return ERROR_SUCCESS;
} }
/* /*
* @implemented * @implemented
* http://msdn.microsoft.com/en-us/library/ff565015%28VS.85%29.aspx
*/ */
VOID VOID
APIENTRY APIENTRY
EngSetLastError(IN ULONG iError) EngSetLastError(IN ULONG iError)
{ {
// www.osr.com/ddk/graphics/gdifncs_95m0.htm PTEB pTeb = NtCurrentTeb();
SetLastNtError ( iError ); if (pTeb)
pTeb->LastErrorValue = iError;
} }