From: Michael Müller michael@fds-team.de
Windows 9x doesnt have function GetFileVersionInfoSizeExA/W however is does have function GetFileVersionInfoSizeA/W. Since all the GetFileVersionInfoSize* functions go though GetFileVersionInfoSizeExW, this seems the best position for the code.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/version/version.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/version/version.c b/dlls/version/version.c index 13436ca..f33361b 100644 --- a/dlls/version/version.c +++ b/dlls/version/version.c @@ -705,7 +705,12 @@ DWORD WINAPI GetFileVersionInfoSizeExW( DWORD flags, LPCWSTR filename, LPDWORD h return (len * 2) + 4;
default: - SetLastError( lzfd == HFILE_ERROR ? ofs.nErrCode : ERROR_RESOURCE_DATA_NOT_FOUND ); + if (lzfd == HFILE_ERROR) + SetLastError(ofs.nErrCode); + else if (GetVersion() & 0x80000000) /* Windows 95/98 */ + SetLastError(ERROR_FILE_NOT_FOUND); + else + SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND); return 0; } }