From 4d772974cccc34c3a283daee8a8c56f7bf3063ce Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 31 Aug 2007 14:38:48 +0000 Subject: [PATCH] implement GetFontAssocStatus. do correct implement of GetFontData, if the lpvBuffer are NULL in user mode, gdi32.dll always send in cbData as 0 to win32k.sys svn path=/trunk/; revision=28706 --- reactos/dll/win32/gdi32/gdi32.def | 2 +- reactos/dll/win32/gdi32/misc/stubs.c | 33 ++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/gdi32/gdi32.def b/reactos/dll/win32/gdi32/gdi32.def index a773b0182af..455010babec 100644 --- a/reactos/dll/win32/gdi32/gdi32.def +++ b/reactos/dll/win32/gdi32/gdi32.def @@ -385,7 +385,7 @@ GetEnhMetaFilePaletteEntries@12 GetEnhMetaFilePixelFormat@12 GetEnhMetaFileW@4 GetFontAssocStatus@4 -GetFontData@20=NtGdiGetFontData@20 +GetFontData@20 GetFontLanguageInfo@4 GetFontResourceInfoW@16 GetFontUnicodeRanges@8 diff --git a/reactos/dll/win32/gdi32/misc/stubs.c b/reactos/dll/win32/gdi32/misc/stubs.c index 7c61f7c4cb1..df6083b4214 100644 --- a/reactos/dll/win32/gdi32/misc/stubs.c +++ b/reactos/dll/win32/gdi32/misc/stubs.c @@ -1689,15 +1689,20 @@ GetEUDCTimeStamp(VOID) } /* - * @unimplemented + * @implemented */ ULONG STDCALL GetFontAssocStatus(HDC hdc) { - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + ULONG retValue = 0; + + if (hdc) + { + retValue = NtGdiQueryFontAssocInfo(hdc); + } + + return retValue; } /* @@ -2912,3 +2917,23 @@ GetCharABCWidths(HDC hdc, /* FIXME some part need be done in user mode */ return NtGdiGetCharABCWidths(hdc, uFirstChar, uLastChar, lpabc); } + + +/* + * @implemented + * + */ +DWORD +STDCALL +GetFontData(HDC hdc, + DWORD dwTable, + DWORD dwOffset, + LPVOID lpvBuffer, + DWORD cbData) +{ + if (!lpvBuffer) + { + cbData = 0; + } + return NtGdiGetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData); +}