mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:02:58 +00:00
make AddFontResourceExA lite faster.
svn path=/trunk/; revision=28540
This commit is contained in:
parent
2b7a66234a
commit
850675cbdd
1 changed files with 12 additions and 6 deletions
|
@ -1116,16 +1116,22 @@ AddFontResourceExA ( LPCSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
||||||
PWSTR FilenameW;
|
PWSTR FilenameW;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
if (!(fl & (FR_PRIVATE | FR_NOT_ENUM)))
|
||||||
if ( !NT_SUCCESS (Status) )
|
|
||||||
{
|
{
|
||||||
SetLastError (RtlNtStatusToDosError(Status));
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc = AddFontResourceExW ( FilenameW, fl, pvReserved );
|
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
||||||
|
if ( !NT_SUCCESS (Status) )
|
||||||
HEAP_free ( FilenameW );
|
{
|
||||||
|
SetLastError (RtlNtStatusToDosError(Status));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rc = GdiAddFontResourceW ( FilenameW, fl, 0 );
|
||||||
|
HEAP_free ( FilenameW );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue