mirror of
https://github.com/reactos/reactos.git
synced 2024-10-21 00:18:26 +00:00
Fix : make AddFontResourceA acts like AddFontResourceW
Fix : smaller typo in AddFontResourceW svn path=/trunk/; revision=28539
This commit is contained in:
parent
2c540b735a
commit
2b7a66234a
|
@ -1118,7 +1118,9 @@ AddFontResourceExA ( LPCSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
||||||
|
|
||||||
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
||||||
if ( !NT_SUCCESS (Status) )
|
if ( !NT_SUCCESS (Status) )
|
||||||
|
{
|
||||||
SetLastError (RtlNtStatusToDosError(Status));
|
SetLastError (RtlNtStatusToDosError(Status));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc = AddFontResourceExW ( FilenameW, fl, pvReserved );
|
rc = AddFontResourceExW ( FilenameW, fl, pvReserved );
|
||||||
|
@ -1136,7 +1138,22 @@ int
|
||||||
STDCALL
|
STDCALL
|
||||||
AddFontResourceA ( LPCSTR lpszFilename )
|
AddFontResourceA ( LPCSTR lpszFilename )
|
||||||
{
|
{
|
||||||
return AddFontResourceExA ( lpszFilename, 0, 0 );
|
NTSTATUS Status;
|
||||||
|
PWSTR FilenameW;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
||||||
|
if ( !NT_SUCCESS (Status) )
|
||||||
|
{
|
||||||
|
SetLastError (RtlNtStatusToDosError(Status));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rc = GdiAddFontResourceW ( FilenameW, 0, 0);
|
||||||
|
|
||||||
|
HEAP_free ( FilenameW );
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1147,7 +1164,7 @@ int
|
||||||
STDCALL
|
STDCALL
|
||||||
AddFontResourceW ( LPCWSTR lpszFilename )
|
AddFontResourceW ( LPCWSTR lpszFilename )
|
||||||
{
|
{
|
||||||
return AddFontResourceExW ( lpszFilename, 0, 0 );
|
return GdiAddFontResourceW ( lpszFilename, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue