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
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
*/
ULONG
APIENTRY
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)
{
// www.osr.com/ddk/graphics/gdifncs_95m0.htm
SetLastNtError ( iError );
PTEB pTeb = NtCurrentTeb();
if (pTeb)
pTeb->LastErrorValue = iError;
}