- NtUserScrollDC() only returns TRUE or FALSE

- NtGdiBitBlt(): don't SetLastError() on invalid dc, don't DPRINT1, DPRINT is enough.
- IntGdiGetClipBox(): don't SetLastError() on invalid dc

svn path=/trunk/; revision=30344
This commit is contained in:
Timo Kreuzer 2007-11-11 00:41:27 +00:00
parent 556614fa8a
commit a8f9ec7c2a
4 changed files with 7 additions and 11 deletions

View file

@ -1791,7 +1791,7 @@ NtUserSBGetParms(
DWORD Unknown2, DWORD Unknown2,
DWORD Unknown3); DWORD Unknown3);
DWORD BOOL
NTAPI NTAPI
NtUserScrollDC( NtUserScrollDC(
HDC hDC, HDC hDC,

View file

@ -1230,7 +1230,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcScroll,
* @implemented * @implemented
*/ */
DWORD STDCALL BOOL STDCALL
NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcUnsafeScroll, NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcUnsafeScroll,
const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate) const RECT *prcUnsafeClip, HRGN hrgnUpdate, LPRECT prcUnsafeUpdate)
{ {
@ -1276,8 +1276,8 @@ NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcUnsafeScroll,
prcUnsafeUpdate? &rcUpdate : NULL); prcUnsafeUpdate? &rcUpdate : NULL);
if(Result == ERROR) if(Result == ERROR)
{ {
/* FIXME: SetLastError? */ /* FIXME: Only if hRgnUpdate is invalid we should SetLastError(ERROR_INVALID_HANDLE) */
RETURN(Result); RETURN(FALSE);
} }
if (prcUnsafeUpdate) if (prcUnsafeUpdate)
@ -1299,7 +1299,7 @@ NtUserScrollDC(HDC hDC, INT dx, INT dy, const RECT *prcUnsafeScroll,
} }
} }
RETURN(Result); RETURN(TRUE);
CLEANUP: CLEANUP:
DPRINT("Leave NtUserScrollDC, ret=%i\n",_ret_); DPRINT("Leave NtUserScrollDC, ret=%i\n",_ret_);

View file

@ -196,8 +196,7 @@ NtGdiBitBlt(
DCDest = DC_LockDc(hDCDest); DCDest = DC_LockDc(hDCDest);
if (NULL == DCDest) if (NULL == DCDest)
{ {
DPRINT1("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest); DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCDest->IsIC) if (DCDest->IsIC)
@ -215,8 +214,7 @@ NtGdiBitBlt(
if (NULL == DCSrc) if (NULL == DCSrc)
{ {
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
DPRINT1("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc); DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCSrc->IsIC) if (DCSrc->IsIC)

View file

@ -178,14 +178,12 @@ IntGdiGetClipBox(HDC hDC, LPRECT rc)
if (!(dc = DC_LockDc(hDC))) if (!(dc = DC_LockDc(hDC)))
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE);
return ERROR; return ERROR;
} }
if (!(Rgn = RGNDATA_LockRgn(dc->w.hGCClipRgn))) if (!(Rgn = RGNDATA_LockRgn(dc->w.hGCClipRgn)))
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return ERROR; return ERROR;
} }
retval = UnsafeIntGetRgnBox(Rgn, rc); retval = UnsafeIntGetRgnBox(Rgn, rc);