[ros-diffs] [jimtabor] 26443: Implement GetAndSetDCDWord. Clearing out my code base. This has set here for six months now.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Sat Apr 21 01:31:52 CEST 2007


Author: jimtabor
Date: Sat Apr 21 03:31:51 2007
New Revision: 26443

URL: http://svn.reactos.org/svn/reactos?rev=26443&view=rev
Log:
Implement GetAndSetDCDWord. Clearing out my code base. This has set here for six months now.

Modified:
    trunk/reactos/dll/win32/gdi32/objects/dc.c

Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc.c?rev=26443&r1=26442&r2=26443&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/dc.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/dc.c Sat Apr 21 03:31:51 2007
@@ -325,11 +325,53 @@
 }
 
 
+/*
+ * @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;
 }




More information about the Ros-diffs mailing list