From eff89f2d9a4c3070617ba2bcc05297c1c400c046 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 20 Apr 2007 23:31:51 +0000 Subject: [PATCH] Implement GetAndSetDCDWord. Clearing out my code base. This has set here for six months now. svn path=/trunk/; revision=26443 --- reactos/dll/win32/gdi32/objects/dc.c | 44 +++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/gdi32/objects/dc.c b/reactos/dll/win32/gdi32/objects/dc.c index 3efc0995264..33f8b74c3c0 100644 --- a/reactos/dll/win32/gdi32/objects/dc.c +++ b/reactos/dll/win32/gdi32/objects/dc.c @@ -325,11 +325,53 @@ GetRelAbs( } +/* + * @implemented + */ +DWORD +STDCALL +GetAndSetDCDWord( HDC hDC, INT u, DWORD dwIn, DWORD Unk1, DWORD Unk2, DWORD Unk3 ) +{ + BOOL Ret = TRUE; +// Handle something other than a normal dc object. + if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) + return 0; //call MFDRV + else + { + PLDC pLDC = GdiGetLDC(hDC); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return 0; + } + if (pLDC->iType == LDC_EMFLDC) + { + Ret = TRUE; //call EMFDRV + if (Ret) + return u; + return 0; + } + } + } +// Ret = NtGdiGetAndSetDCDword( hDC, u, dwIn, (DWORD*) &u ); + if (Ret) + return u; + else + SetLastError(ERROR_INVALID_HANDLE); + return 0; +} + + +/* + * @implemented + */ DWORD STDCALL GetDCDWord( HDC hDC, INT u, DWORD Result ) { -BOOL Ret = TRUE; //NtGdiGetDCDword( hDC, u, (DWORD*) &u ); + BOOL Ret = TRUE; //NtGdiGetDCDword( hDC, u, (DWORD*) &u ); if (!Ret) return Result; else return u; }