=?UTF-8?Q?Michael=20M=C3=BCller=20?=: version: Return ERROR_FILE_NOT_FOUND for Win 9x when a file was not found in GetFileVersionInfoSize.
Alexandre Julliard
julliard at winehq.org
Thu May 17 19:10:58 CDT 2018
Module: wine
Branch: master
Commit: df3dfa7baf2def12498d7d87d3dab4629eb90f68
URL: https://source.winehq.org/git/wine.git/?a=commit;h=df3dfa7baf2def12498d7d87d3dab4629eb90f68
Author: Michael Müller <michael at fds-team.de>
Date: Thu May 17 04:20:52 2018 +0000
version: Return ERROR_FILE_NOT_FOUND for Win 9x when a file was not found in GetFileVersionInfoSize.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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;
}
}
More information about the wine-cvs
mailing list