Michael Müller : version: Return ERROR_FILE_NOT_FOUND for Win 9x when a file was not found in GetFileVersionInfoSize.
Module: wine Branch: master Commit: df3dfa7baf2def12498d7d87d3dab4629eb90f68 URL: https://source.winehq.org/git/wine.git/?a=commit;h=df3dfa7baf2def12498d7d87d... Author: Michael Müller <michael(a)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(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)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; } }
participants (1)
-
Alexandre Julliard