Jacek Caban : gdi32: Use ntgdi for AddFontResourceExW and RemoveFontResourceExW.
Alexandre Julliard
julliard at winehq.org
Wed Sep 1 15:45:10 CDT 2021
Module: wine
Branch: master
Commit: 7da78fd269309cfa8ed27aededb2c67e24507439
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7da78fd269309cfa8ed27aededb2c67e24507439
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Sep 1 14:08:52 2021 +0200
gdi32: Use ntgdi for AddFontResourceExW and RemoveFontResourceExW.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/font.c | 10 ++++++----
dlls/gdi32/text.c | 16 ++++++++++++++++
include/ntgdi.h | 4 ++++
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 99b018513d3..c5641cd4653 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -6251,9 +6251,10 @@ void font_init(void)
}
/***********************************************************************
- * AddFontResourceExW (GDI32.@)
+ * NtGdiAddFontResourceW (win32u.@)
*/
-INT WINAPI AddFontResourceExW( LPCWSTR str, DWORD flags, PVOID pdv )
+INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files, DWORD flags,
+ DWORD tid, void *dv )
{
int ret;
WCHAR *filename;
@@ -6344,9 +6345,10 @@ BOOL WINAPI NtGdiRemoveFontMemResourceEx( HANDLE handle )
}
/***********************************************************************
- * RemoveFontResourceExW (GDI32.@)
+ * NtGdiRemoveFontResourceW (win32u.@)
*/
-BOOL WINAPI RemoveFontResourceExW( LPCWSTR str, DWORD flags, PVOID pdv )
+BOOL WINAPI NtGdiRemoveFontResourceW( const WCHAR *str, ULONG size, ULONG files, DWORD flags,
+ DWORD tid, void *dv )
{
int ret;
WCHAR *filename;
diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c
index 227651f2afc..d1f7050e21a 100644
--- a/dlls/gdi32/text.c
+++ b/dlls/gdi32/text.c
@@ -2275,6 +2275,22 @@ BOOL WINAPI RemoveFontResourceExA( const char *str, DWORD fl, void *pdv )
return ret;
}
+/***********************************************************************
+ * AddFontResourceExW (GDI32.@)
+ */
+INT WINAPI AddFontResourceExW( const WCHAR *str, DWORD flags, void *dv )
+{
+ return NtGdiAddFontResourceW( str, 0, 1, flags, 0, dv );
+}
+
+/***********************************************************************
+ * RemoveFontResourceExW (GDI32.@)
+ */
+BOOL WINAPI RemoveFontResourceExW( const WCHAR *str, DWORD flags, void *dv )
+{
+ return NtGdiRemoveFontResourceW( str, 0, 1, flags, 0, dv );
+}
+
/***********************************************************************
* GetFontResourceInfoW (GDI32.@)
*/
diff --git a/include/ntgdi.h b/include/ntgdi.h
index 47777b3f129..00783975e18 100644
--- a/include/ntgdi.h
+++ b/include/ntgdi.h
@@ -210,6 +210,8 @@ INT WINAPI NtGdiAbortDoc( HDC hdc );
BOOL WINAPI NtGdiAbortPath( HDC hdc );
HANDLE WINAPI NtGdiAddFontMemResourceEx( void *ptr, DWORD size, void *dv, ULONG dv_size,
DWORD *count );
+INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files, DWORD flags,
+ DWORD tid, void *dv );
BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
BLENDFUNCTION blend_function, HANDLE xform );
@@ -351,6 +353,8 @@ BOOL WINAPI NtGdiRectInRegion( HRGN hrgn, const RECT *rect );
BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect );
BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom );
BOOL WINAPI NtGdiRemoveFontMemResourceEx( HANDLE handle );
+BOOL WINAPI NtGdiRemoveFontResourceW( const WCHAR *str, ULONG size, ULONG files,
+ DWORD flags, DWORD tid, void *dv );
BOOL WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
DRIVER_INFO_2W *driver_info, void *dev );
BOOL WINAPI NtGdiResizePalette( HPALETTE palette, UINT count );
More information about the wine-cvs
mailing list