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?…
==============================================================================
--- 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@12=NtGdiDdAddAttachedSurface@12
DdEntry8@12=NtGdiDdAlphaBlt@12
DdEntry9@8=NtGdiDdAttachSurface@8
-
-
-
DeleteColorSpace@4=NtGdiDeleteColorSpace@4
DeleteDC@4
DeleteEnhMetaFile@4
@@ -273,6 +270,7 @@
GdiDeleteSpoolFileHandle@4
GdiDescribePixelFormat@16=NtGdiDescribePixelFormat@16
GdiDllInitialize@12
+GdiDrawStream@12
GdiEndDocEMF@4
GdiEndPageEMF@8
GdiEntry10@8
@@ -338,6 +336,7 @@
GdiValidateHandle@4
GetArcDirection@4
GetAspectRatioFilterEx@8
+GetBitmapAttributes@4
GetBitmapBits@12=NtGdiGetBitmapBits@12
GetBitmapDimensionEx@8=NtGdiGetBitmapDimension@8
GetBkColor@4
@@ -609,8 +608,8 @@
XLATEOBJ_cGetPalette@16=NtGdiXLATEOBJ_cGetPalette@16
XLATEOBJ_hGetColorTransform@4=NtGdiXLATEOBJ_hGetColorTransform@4
-GdiDrawStream@12
-GetBitmapAttributes@4
+
+
GetBrushAttributes@4
GetGlyphIndicesA@20
GetTextExtentExPointWPri@28
Modified: trunk/reactos/dll/win32/gdi32/misc/gdientry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/gdien…
==============================================================================
--- 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/histo…
==============================================================================
--- 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.…
==============================================================================
--- 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…
==============================================================================
--- 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;
}
/*