Author: fireball Date: Thu Aug 6 13:48:07 2009 New Revision: 42424
URL: http://svn.reactos.org/svn/reactos?rev=42424&view=rev Log: - Implement RosGdiGetDcRects. - Wrap usermode pointers access in RosGdiSetDcRects/GetDcRects to SEH.
Modified: branches/arwinss/reactos/include/psdk/ntrosgdi.h branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: branches/arwinss/reactos/include/psdk/ntrosgdi.h URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/ntr... ============================================================================== --- branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/psdk/ntrosgdi.h [iso-8859-1] Thu Aug 6 13:48:07 2009 @@ -117,6 +117,7 @@ const PIXELFORMATDESCRIPTOR *ppfd); COLORREF APIENTRY RosGdiSetTextColor( HDC physDev, COLORREF color ); VOID APIENTRY RosGdiSetDcRects( HDC physDev, RECT *rcDcRect, RECT *rcVport ); +VOID APIENTRY RosGdiGetDcRects( HDC physDev, RECT *rcDcRect, RECT *rcVport );
/* enum.c */ int APIENTRY RosGdiChoosePixelFormat(HDC physDev,
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Thu Aug 6 13:48:07 2009 @@ -522,13 +522,46 @@ /* Get a pointer to the DC */ pDC = DC_Lock(physDev);
- /* Set DC rectangle */ - if (rcDcRect) - pDC->rcDcRect = *rcDcRect; - - /* Set viewport rectangle */ - if (rcVport) - pDC->rcVport = *rcVport; + _SEH2_TRY + { + /* Set DC rectangle */ + if (rcDcRect) + pDC->rcDcRect = *rcDcRect; + + /* Set viewport rectangle */ + if (rcVport) + pDC->rcVport = *rcVport; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + } + _SEH2_END; + + /* Release the object */ + DC_Unlock(pDC); +} + +VOID APIENTRY RosGdiGetDcRects( HDC physDev, RECT *rcDcRect, RECT *rcVport ) +{ + PDC pDC; + + /* Get a pointer to the DC */ + pDC = DC_Lock(physDev); + + _SEH2_TRY + { + /* Set DC rectangle */ + if (rcDcRect) + *rcDcRect = pDC->rcDcRect; + + /* Set viewport rectangle */ + if (rcVport) + *rcVport = pDC->rcVport; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + } + _SEH2_END;
/* Release the object */ DC_Unlock(pDC);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Thu Aug 6 13:48:07 2009 @@ -31,6 +31,7 @@ RosGdiSetPixelFormat 3 RosGdiSetTextColor 2 RosGdiSetDcRects 3 +RosGdiGetDcRects 3 RosGdiChoosePixelFormat 2 RosGdiDescribePixelFormat 4 RosGdiEnumDeviceFonts 4