[ros-diffs] [greatlrd] 28465: Bugfix : AddFontResourceExW, SetLastError to invaild param when the fl are not set. Redirect : AnyLinkedFonts at 0 to NtGdiAnyLinkedFonts at 0 (stubed in win32k) Redirect : BRUSHOBJ_hGetColorTransform at 4 to NtGdiBRUSHOBJ_hGetColorTransform at 4 (stubed in win32k) Redirect : BRUSHOBJ_pvAllocRbrush at 8 to NtGdiBRUSHOBJ_pvAllocRbrush at 8 (stubed in win32k) partly working : GdiAddFontResourceW is parttly working but it does not works as windows version, instead for being stub, it is not finish implementions of it. This is nassry to clean up some mess.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Thu Aug 23 11:52:32 CEST 2007


Author: greatlrd
Date: Thu Aug 23 13:52:31 2007
New Revision: 28465

URL: http://svn.reactos.org/svn/reactos?rev=28465&view=rev
Log:
Bugfix : AddFontResourceExW, SetLastError to invaild param when the fl are not set. 
Redirect : AnyLinkedFonts at 0 to NtGdiAnyLinkedFonts at 0 (stubed in win32k)
Redirect : BRUSHOBJ_hGetColorTransform at 4 to NtGdiBRUSHOBJ_hGetColorTransform at 4 (stubed in win32k)
Redirect : BRUSHOBJ_pvAllocRbrush at 8 to  NtGdiBRUSHOBJ_pvAllocRbrush at 8  (stubed in win32k)
partly working : GdiAddFontResourceW is parttly working but it does not works as windows version, instead for being stub, it is not finish implementions of it. This is nassry to clean up some mess. 


Modified:
    trunk/reactos/dll/win32/gdi32/gdi32.def
    trunk/reactos/dll/win32/gdi32/include/gdi32p.h
    trunk/reactos/dll/win32/gdi32/misc/stubs.c
    trunk/reactos/dll/win32/gdi32/misc/stubsw.c
    trunk/reactos/dll/win32/gdi32/objects/font.c

Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?rev=28465&r1=28464&r2=28465&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Thu Aug 23 13:52:31 2007
@@ -14,28 +14,29 @@
 AddFontResourceA at 4
 AddFontResourceExA at 12
 AddFontResourceExW at 12
+AddFontResourceTracking at 8
 AddFontResourceW at 4
-AddFontResourceTracking at 8
 AngleArc at 24
 AnimatePalette at 16
-AnyLinkedFonts at 0
+AnyLinkedFonts at 0=NtGdiAnyLinkedFonts at 0
 Arc at 36
 ArcTo at 36
-BeginPath at 4
-BRUSHOBJ_hGetColorTransform at 4
-BRUSHOBJ_pvAllocRbrush at 8
+BRUSHOBJ_hGetColorTransform at 4=NtGdiBRUSHOBJ_hGetColorTransform at 4
+BRUSHOBJ_pvAllocRbrush at 8=NtGdiBRUSHOBJ_pvAllocRbrush at 8
+
 BRUSHOBJ_pvGetRbrush at 4
 BRUSHOBJ_ulGetBrushColor at 4
+BeginPath at 4
 BitBlt at 36
+CLIPOBJ_bEnum at 12
+CLIPOBJ_cEnumStart at 20
+CLIPOBJ_ppoGetPath at 4
 CancelDC at 4
 CheckColorsInGamut at 16
 ChoosePixelFormat at 8
 Chord at 36
 ClearBitmapAttributes at 8
 ClearBrushAttributes at 8
-CLIPOBJ_bEnum at 12
-CLIPOBJ_cEnumStart at 20
-CLIPOBJ_ppoGetPath at 4
 CloseEnhMetaFile at 4
 CloseFigure at 4
 CloseMetaFile at 4

Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gdi32p.h?rev=28465&r1=28464&r2=28465&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/include/gdi32p.h (original)
+++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h Thu Aug 23 13:52:31 2007
@@ -184,5 +184,9 @@
 WINAPI
 UserRealizePalette(HDC hDC);
 
+int
+STDCALL
+GdiAddFontResourceW(LPCWSTR lpszFilename,FLONG fl,DESIGNVECTOR *pdv);
+
 /* EOF */
 

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=28465&r1=28464&r2=28465&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Thu Aug 23 13:52:31 2007
@@ -1314,17 +1314,7 @@
 	return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL 
-STDCALL 
-AnyLinkedFonts(VOID)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
+
 
 /*
  * @unimplemented
@@ -2442,28 +2432,9 @@
 	return 0;
 }
 
-/*
- * @unimplemented
- */
-HANDLE STDCALL
-BRUSHOBJ_hGetColorTransform(BRUSHOBJ *pbo)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
-
-/*
- * @unimplemented
- */
-PVOID STDCALL
-BRUSHOBJ_pvAllocRbrush(IN BRUSHOBJ *BrushObj,
-		       IN ULONG ObjSize)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
-}
+
+
+
 
 /*
  * @unimplemented

Modified: trunk/reactos/dll/win32/gdi32/misc/stubsw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubsw.c?rev=28465&r1=28464&r2=28465&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubsw.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubsw.c Thu Aug 23 13:52:31 2007
@@ -258,11 +258,16 @@
  */
 int
 STDCALL
-GdiAddFontResourceW(LPCWSTR filename,FLONG f,DESIGNVECTOR *pdv)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-	return 0;
+GdiAddFontResourceW(LPCWSTR lpszFilename,FLONG fl,DESIGNVECTOR *pdv)
+{
+	UNICODE_STRING Filename;
+	//UNIMPLEMENTED;
+	//SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+	//return 0;
+
+	/* FIXME handle fl parameter */
+	RtlInitUnicodeString(&Filename, lpszFilename);
+	return NtGdiAddFontResource ( &Filename, fl );
 }
 
 /*

Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/font.c?rev=28465&r1=28464&r2=28465&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c Thu Aug 23 13:52:31 2007
@@ -1091,11 +1091,17 @@
 STDCALL
 AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved )
 {
-  UNICODE_STRING Filename;
-
-  /* FIXME handle fl parameter */
-  RtlInitUnicodeString(&Filename, lpszFilename);
-  return NtGdiAddFontResource ( &Filename, fl );
+    int retVal = 0;
+
+    if (fl & (FR_PRIVATE | FR_NOT_ENUM))
+    {
+        retVal = GdiAddFontResourceW(lpszFilename, fl,0);
+    }
+    else
+    {
+        SetLastError( ERROR_INVALID_PARAMETER );
+    }
+    return retVal;
 }
 
 




More information about the Ros-diffs mailing list