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@0 to NtGdiAnyLinkedFonts@0 (stubed in win32k) Redirect : BRUSHOBJ_hGetColorTransform@4 to NtGdiBRUSHOBJ_hGetColorTransform@4 (stubed in win32k) Redirect : BRUSHOBJ_pvAllocRbrush@8 to NtGdiBRUSHOBJ_pvAllocRbrush@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?r... ============================================================================== --- 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@4 AddFontResourceExA@12 AddFontResourceExW@12 +AddFontResourceTracking@8 AddFontResourceW@4 -AddFontResourceTracking@8 AngleArc@24 AnimatePalette@16 -AnyLinkedFonts@0 +AnyLinkedFonts@0=NtGdiAnyLinkedFonts@0 Arc@36 ArcTo@36 -BeginPath@4 -BRUSHOBJ_hGetColorTransform@4 -BRUSHOBJ_pvAllocRbrush@8 +BRUSHOBJ_hGetColorTransform@4=NtGdiBRUSHOBJ_hGetColorTransform@4 +BRUSHOBJ_pvAllocRbrush@8=NtGdiBRUSHOBJ_pvAllocRbrush@8 + BRUSHOBJ_pvGetRbrush@4 BRUSHOBJ_ulGetBrushColor@4 +BeginPath@4 BitBlt@36 +CLIPOBJ_bEnum@12 +CLIPOBJ_cEnumStart@20 +CLIPOBJ_ppoGetPath@4 CancelDC@4 CheckColorsInGamut@16 ChoosePixelFormat@8 Chord@36 ClearBitmapAttributes@8 ClearBrushAttributes@8 -CLIPOBJ_bEnum@12 -CLIPOBJ_cEnumStart@20 -CLIPOBJ_ppoGetPath@4 CloseEnhMetaFile@4 CloseFigure@4 CloseMetaFile@4
Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gdi... ============================================================================== --- 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.... ============================================================================== --- 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... ============================================================================== --- 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/fon... ============================================================================== --- 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; }