version: Check for 16-bit file format before returning ERROR_RESOURCE_DATA_NOT_FOUND.

This commit is contained in:
Aric Stewart 2008-02-13 10:17:05 -06:00 committed by Alexandre Julliard
parent 461ce6e4a2
commit 1a328d9126
1 changed files with 4 additions and 4 deletions

View File

@ -253,9 +253,6 @@ static DWORD VERSION_GetFileVersionInfo_PE( LPCWSTR filename, DWORD datasize, LP
{
WARN("Could not load %s\n", debugstr_w(filename));
if (GetLastError() == ERROR_BAD_EXE_FORMAT)
return 0xFFFFFFFF;
return 0;
}
hRsrc = FindResourceW(hModule,
@ -384,7 +381,10 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV
if(hModule < 32)
{
WARN("Could not load %s\n", debugstr_a(filename));
return 0;
if (hModule == ERROR_BAD_FORMAT)
return 0xFFFFFFFF;
else
return 0x0;
}
hRsrc = FindResource16(hModule,
MAKEINTRESOURCEA(VS_VERSION_INFO),