mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
NT sets the error code to ERROR_RESOURCE_DATA_NOT_FOUND if the file
exists but does not contain version information.
This commit is contained in:
parent
c7b806114d
commit
1dc62b7ebf
1 changed files with 10 additions and 2 deletions
|
@ -440,11 +440,19 @@ DWORD WINAPI GetFileVersionInfoSizeA( LPCSTR filename, LPDWORD handle )
|
|||
|
||||
len = VERSION_GetFileVersionInfo_PE(filename, handle, 0, NULL);
|
||||
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
|
||||
if(len == 0xFFFFFFFF) return 0;
|
||||
if(len == 0xFFFFFFFF)
|
||||
{
|
||||
SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND);
|
||||
return 0;
|
||||
}
|
||||
if(len) return len;
|
||||
len = VERSION_GetFileVersionInfo_16(filename, handle, 0, NULL);
|
||||
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
|
||||
if(len == 0xFFFFFFFF) return 0;
|
||||
if(len == 0xFFFFFFFF)
|
||||
{
|
||||
SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND);
|
||||
return 0;
|
||||
}
|
||||
if(len) return len;
|
||||
|
||||
len = GetFileResourceSize16( filename,
|
||||
|
|
Loading…
Reference in a new issue