[ros-diffs] [greatlrd] 29203: forget commit Implement of GdiGetLocalBrush, GdiGetLocalDC, GdiGetLocalFont fix a smaller bug in GdiSetBatchLimit fix GdiSetLastError to be simluare to windows xp

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Tue Sep 25 22:44:53 CEST 2007


Author: greatlrd
Date: Wed Sep 26 00:44:53 2007
New Revision: 29203

URL: http://svn.reactos.org/svn/reactos?rev=29203&view=rev
Log:
forget commit Implement of GdiGetLocalBrush, GdiGetLocalDC, GdiGetLocalFont
fix a smaller bug in GdiSetBatchLimit
fix GdiSetLastError to be simluare to windows xp 


Modified:
    trunk/reactos/dll/win32/gdi32/gdi32.def
    trunk/reactos/dll/win32/gdi32/misc/gdientry.c
    trunk/reactos/dll/win32/gdi32/misc/historic.c
    trunk/reactos/dll/win32/gdi32/misc/misc.c
    trunk/reactos/dll/win32/gdi32/misc/stubs.c

Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?rev=29203&r1=29202&r2=29203&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Wed Sep 26 00:44:53 2007
@@ -146,9 +146,6 @@
 DdEntry7 at 12=NtGdiDdAddAttachedSurface at 12
 DdEntry8 at 12=NtGdiDdAlphaBlt at 12
 DdEntry9 at 8=NtGdiDdAttachSurface at 8
-
-
-
 DeleteColorSpace at 4=NtGdiDeleteColorSpace at 4
 DeleteDC at 4
 DeleteEnhMetaFile at 4
@@ -273,6 +270,7 @@
 GdiDeleteSpoolFileHandle at 4
 GdiDescribePixelFormat at 16=NtGdiDescribePixelFormat at 16
 GdiDllInitialize at 12
+GdiDrawStream at 12
 GdiEndDocEMF at 4
 GdiEndPageEMF at 8
 GdiEntry10 at 8
@@ -338,6 +336,7 @@
 GdiValidateHandle at 4
 GetArcDirection at 4
 GetAspectRatioFilterEx at 8
+GetBitmapAttributes at 4
 GetBitmapBits at 12=NtGdiGetBitmapBits at 12
 GetBitmapDimensionEx at 8=NtGdiGetBitmapDimension at 8
 GetBkColor at 4
@@ -609,8 +608,8 @@
 XLATEOBJ_cGetPalette at 16=NtGdiXLATEOBJ_cGetPalette at 16
 XLATEOBJ_hGetColorTransform at 4=NtGdiXLATEOBJ_hGetColorTransform at 4
 
-GdiDrawStream at 12
-GetBitmapAttributes at 4
+
+
 GetBrushAttributes at 4
 GetGlyphIndicesA at 20
 GetTextExtentExPointWPri at 28

Modified: trunk/reactos/dll/win32/gdi32/misc/gdientry.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/gdientry.c?rev=29203&r1=29202&r2=29203&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/gdientry.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/gdientry.c Wed Sep 26 00:44:53 2007
@@ -485,7 +485,7 @@
         if (!ghDirectDraw)
         {
             /* Create the DC */
-            if ((hdc = CreateDC(L"Display", NULL, NULL, NULL)))
+            if ((hdc = CreateDCW(L"Display", NULL, NULL, NULL)))
             {
                 /* Create the DDraw Object */
                 ghDirectDraw = NtGdiDdCreateDirectDrawObject(hdc);
@@ -509,7 +509,7 @@
     else
     {
         /* Using the per-process object, so create it */
-    pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc); 
+         pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc); 
     
         /* Set the return value */
         Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
@@ -830,8 +830,7 @@
 DdCreateSurfaceObject( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
                        BOOL bPrimarySurface)
 {
-	return bDDCreateSurface(pSurfaceLocal, TRUE);
-    //return bDdCreateSurfaceObject(pSurfaceLocal, TRUE);
+    return bDDCreateSurface(pSurfaceLocal, TRUE);
 }
 
 
@@ -911,8 +910,8 @@
                    HANDLE hSectionApp,
                    DWORD dwOffset)
 {
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -988,6 +987,7 @@
 STDCALL 
 DdQueryDisplaySettingsUniqueness()
 {
+    /* FIXME share memory */
  return RemberDdQueryDisplaySettingsUniquenessID;
 }
 

Modified: trunk/reactos/dll/win32/gdi32/misc/historic.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/historic.c?rev=29203&r1=29202&r2=29203&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/historic.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/historic.c Wed Sep 26 00:44:53 2007
@@ -265,3 +265,34 @@
 {
     return newhfnt;
 }
+
+/*
+ * @implemented
+ */
+HBRUSH 
+STDCALL
+GdiGetLocalBrush(HBRUSH hbr)
+{
+    return hbr;
+}
+
+/*
+ * @implemented
+ */
+HDC 
+STDCALL
+GdiGetLocalDC(HDC hdc)
+{
+    return hdc;
+}
+
+/*
+ * @implemented
+ */
+HFONT 
+STDCALL
+GdiGetLocalFont(HFONT hfont)
+{
+    return hfont;
+}
+

Modified: trunk/reactos/dll/win32/gdi32/misc/misc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/misc.c?rev=29203&r1=29202&r2=29203&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/misc.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/misc.c Wed Sep 26 00:44:53 2007
@@ -75,10 +75,19 @@
 STDCALL
 GdiFixUpHandle(HGDIOBJ hGdiObj)
 {
- if (((ULONG_PTR)(hGdiObj)) & GDI_HANDLE_UPPER_MASK ) return hGdiObj;
- PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
- return hGdiObj = (HGDIOBJ)(((LONG_PTR)(hGdiObj)) |
-                     (Entry->Type << GDI_ENTRY_UPPER_SHIFT)); // Rebuild handle for Object
+    PGDI_TABLE_ENTRY Entry;
+
+    if (((ULONG_PTR)(hGdiObj)) & GDI_HANDLE_UPPER_MASK )
+    {
+        return hGdiObj;
+    }
+
+    /* FIXME is this right ?? */
+
+    Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
+
+   /* Rebuild handle for Object */
+    return hGdiObj = (HGDIOBJ)(((LONG_PTR)(hGdiObj)) | (Entry->Type << GDI_ENTRY_UPPER_SHIFT));
 }
 
 /*
@@ -138,8 +147,14 @@
 STDCALL
 GdiSetBatchLimit(DWORD	Limit)
 {
-  DWORD OldLimit = GDI_BatchLimit;
-    if ((!Limit) || (Limit > GDI_BATCH_LIMIT)) return Limit;
+    DWORD OldLimit = GDI_BatchLimit;
+
+    if ( (!Limit) ||
+         (Limit >= GDI_BATCH_LIMIT))
+    {
+        return Limit;
+    }
+
     GdiFlush();
     GDI_BatchLimit = Limit;
     return OldLimit;
@@ -166,17 +181,16 @@
     return 0;
 }
 
-INT STDCALL
-ExtEscape(
-	HDC hDC,
-	int nEscape,
-	int cbInput,
-	LPCSTR lpszInData,
-	int cbOutput,
-	LPSTR lpszOutData
-)
-{
-	return NtGdiExtEscape(hDC, NULL, 0, nEscape, cbInput, (LPSTR)lpszInData, cbOutput, lpszOutData);
+INT
+STDCALL
+ExtEscape(HDC hDC,
+          int nEscape,
+          int cbInput,
+          LPCSTR lpszInData,
+          int cbOutput,
+          LPSTR lpszOutData)
+{
+    return NtGdiExtEscape(hDC, NULL, 0, nEscape, cbInput, (LPSTR)lpszInData, cbOutput, lpszOutData);
 }
 
 /*
@@ -186,5 +200,5 @@
 STDCALL
 GdiSetLastError(DWORD dwErrCode)
 {
-	SetLastError(dwErrCode);
-}
+    NtCurrentTeb ()->LastErrorValue = (ULONG) dwErrCode;
+}

Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.c?rev=29203&r1=29202&r2=29203&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Wed Sep 26 00:44:53 2007
@@ -1502,9 +1502,9 @@
 STDCALL
 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
 {
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1514,9 +1514,9 @@
 STDCALL
 GdiDrawStream(HDC dc, ULONG l, VOID *v)
 {
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1526,45 +1526,9 @@
 STDCALL
 GdiGetCodePage(HDC hdc)
 {
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-/*
- * @unimplemented
- */
-HBRUSH 
-STDCALL
-GdiGetLocalBrush(HBRUSH hbr)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-/*
- * @unimplemented
- */
-HDC 
-STDCALL
-GdiGetLocalDC(HDC hdc)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-/*
- * @unimplemented
- */
-HFONT 
-STDCALL
-GdiGetLocalFont(HFONT hfont)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1574,9 +1538,9 @@
 STDCALL
 GdiIsMetaFileDC(HDC hdc)
 {
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*




More information about the Ros-diffs mailing list