gdi32: Use NtGdiAddFontMemResourceEx for AddFontMemResourceEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
865be24a25
commit
8a68a9ee31
|
@ -6286,15 +6286,16 @@ INT WINAPI AddFontResourceExW( LPCWSTR str, DWORD flags, PVOID pdv )
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AddFontMemResourceEx (GDI32.@)
|
||||
* NtGdiAddFontMemResourceEx (win32u.@)
|
||||
*/
|
||||
HANDLE WINAPI AddFontMemResourceEx( PVOID ptr, DWORD size, PVOID pdv, DWORD *pcFonts )
|
||||
HANDLE WINAPI NtGdiAddFontMemResourceEx( void *ptr, DWORD size, void *dv, ULONG dv_size,
|
||||
DWORD *count )
|
||||
{
|
||||
HANDLE ret;
|
||||
DWORD num_fonts;
|
||||
void *copy;
|
||||
|
||||
if (!ptr || !size || !pcFonts)
|
||||
if (!ptr || !size || !count)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
|
@ -6320,12 +6321,12 @@ HANDLE WINAPI AddFontMemResourceEx( PVOID ptr, DWORD size, PVOID pdv, DWORD *pcF
|
|||
|
||||
__TRY
|
||||
{
|
||||
*pcFonts = num_fonts;
|
||||
*count = num_fonts;
|
||||
}
|
||||
__EXCEPT_PAGE_FAULT
|
||||
{
|
||||
WARN("page fault while writing to *pcFonts (%p)\n", pcFonts);
|
||||
RemoveFontMemResourceEx( ret );
|
||||
WARN( "page fault while writing to *count (%p)\n", count );
|
||||
NtGdiRemoveFontMemResourceEx( ret );
|
||||
ret = 0;
|
||||
}
|
||||
__ENDTRY
|
||||
|
@ -6334,11 +6335,11 @@ HANDLE WINAPI AddFontMemResourceEx( PVOID ptr, DWORD size, PVOID pdv, DWORD *pcF
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveFontMemResourceEx (GDI32.@)
|
||||
* NtGdiRemoveFontMemResourceEx (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI RemoveFontMemResourceEx( HANDLE fh )
|
||||
BOOL WINAPI NtGdiRemoveFontMemResourceEx( HANDLE handle )
|
||||
{
|
||||
FIXME("(%p) stub\n", fh);
|
||||
FIXME( "(%p) stub\n", handle );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
@ stdcall RectInRegion(long ptr) NtGdiRectInRegion
|
||||
@ stdcall RectVisible(long ptr) NtGdiRectVisible
|
||||
@ stdcall Rectangle(long long long long long)
|
||||
@ stdcall RemoveFontMemResourceEx(ptr)
|
||||
@ stdcall RemoveFontMemResourceEx(ptr) NtGdiRemoveFontMemResourceEx
|
||||
@ stdcall RemoveFontResourceA(str)
|
||||
@ stdcall RemoveFontResourceExA(str long ptr)
|
||||
@ stdcall RemoveFontResourceExW(wstr long ptr)
|
||||
|
|
|
@ -2283,3 +2283,11 @@ BOOL WINAPI GetFontResourceInfoW( const WCHAR *str, DWORD *size, void *buffer, D
|
|||
FIXME( "%s %p(%d) %p %d\n", debugstr_w(str), size, size ? *size : 0, buffer, type );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AddFontMemResourceEx (GDI32.@)
|
||||
*/
|
||||
HANDLE WINAPI AddFontMemResourceEx( void *ptr, DWORD size, void *dv, DWORD *count )
|
||||
{
|
||||
return NtGdiAddFontMemResourceEx( ptr, size, dv, 0, count );
|
||||
}
|
||||
|
|
|
@ -208,6 +208,8 @@ struct font_fileinfo
|
|||
|
||||
INT WINAPI NtGdiAbortDoc( HDC hdc );
|
||||
BOOL WINAPI NtGdiAbortPath( HDC hdc );
|
||||
HANDLE WINAPI NtGdiAddFontMemResourceEx( void *ptr, DWORD size, void *dv, ULONG dv_size,
|
||||
DWORD *count );
|
||||
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 );
|
||||
|
@ -348,6 +350,7 @@ BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y );
|
|||
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 NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
|
||||
DRIVER_INFO_2W *driver_info, void *dev );
|
||||
BOOL WINAPI NtGdiResizePalette( HPALETTE palette, UINT count );
|
||||
|
|
Loading…
Reference in New Issue