* DPtoLP/LPtoDP functions should return TRUE even if they get 0 or less points or if pointer to points is invalid. See gdi32:DPtoLP apitest.
* Fixes 24 gdi32:DPtoLP apitests.
svn path=/trunk/; revision=51328
PDC pdc;
LPPOINT Points;
ULONG Size;
- BOOL ret;
+ BOOL ret = TRUE;
+
+ if (Count <= 0)
+ return TRUE;
pdc = DC_LockDc(hDC);
if (!pdc)
{
- EngSetLastError(ERROR_INVALID_HANDLE);
- return FALSE;
- }
-
- if (!UnsafePtsIn || !UnsafePtOut || Count <= 0)
- {
- DC_UnlockDc(pdc);
EngSetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
+ /* Do not set last error */
_SEH2_YIELD(goto leave;)
}
_SEH2_END;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
+ /* Do not set last error */
}
_SEH2_END;