Correct error returns for GetObject and GetObjectType based on Wine tests.

svn path=/trunk/; revision=21007
This commit is contained in:
James Tabor 2006-01-24 05:23:52 +00:00
parent f125cf5904
commit 78a1fa7053

View file

@ -249,6 +249,8 @@ GetObjectA(HGDIOBJ Handle, int Size, LPVOID Buffer)
Type = NtGdiGetObjectType(Handle);
if (0 == Type)
{
/* From Wine: GetObject does not SetLastError() on a null object */
SetLastError(0);
return 0;
}
@ -448,6 +450,8 @@ GetObjectType(
break;
}
}
else
/* From Wine: GetObjectType does SetLastError() on a null object */
SetLastError(ERROR_INVALID_HANDLE);
return Ret;
}