mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Revert wars! ;-)
I talked with GL, he agrees, it is correct. svn path=/trunk/; revision=28754
This commit is contained in:
parent
2b31cf640d
commit
c82d56cc94
1 changed files with 16 additions and 22 deletions
|
@ -1091,17 +1091,13 @@ int
|
|||
STDCALL
|
||||
AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
||||
{
|
||||
int retVal = 0;
|
||||
|
||||
if (fl & (FR_PRIVATE | FR_NOT_ENUM))
|
||||
{
|
||||
retVal = GdiAddFontResourceW(lpszFilename, fl,0);
|
||||
}
|
||||
else
|
||||
if (fl & ~(FR_PRIVATE | FR_NOT_ENUM))
|
||||
{
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
return retVal;
|
||||
|
||||
return GdiAddFontResourceW(lpszFilename, fl,0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1114,26 +1110,24 @@ AddFontResourceExA ( LPCSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
|||
{
|
||||
NTSTATUS Status;
|
||||
PWSTR FilenameW;
|
||||
int rc = 0;
|
||||
int rc;
|
||||
|
||||
if (!(fl & (FR_PRIVATE | FR_NOT_ENUM)))
|
||||
if (fl & ~(FR_PRIVATE | FR_NOT_ENUM))
|
||||
{
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
||||
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
||||
if ( !NT_SUCCESS (Status) )
|
||||
{
|
||||
Status = HEAP_strdupA2W ( &FilenameW, lpszFilename );
|
||||
if ( !NT_SUCCESS (Status) )
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = GdiAddFontResourceW ( FilenameW, fl, 0 );
|
||||
HEAP_free ( FilenameW );
|
||||
}
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
return rc;
|
||||
|
||||
rc = GdiAddFontResourceW ( FilenameW, fl, 0 );
|
||||
HEAP_free ( FilenameW );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue