Francois Gouget : winetest: Clarify the 'version not present' error.

Alexandre Julliard julliard at winehq.org
Mon Mar 29 16:00:05 CDT 2021


Module: wine
Branch: master
Commit: 55f648fac991bcfe1d9d2464b291d29a22a59721
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=55f648fac991bcfe1d9d2464b291d29a22a59721

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Mar 29 15:53:26 2021 +0200

winetest: Clarify the 'version not present' error.

Most of the time the library is actually missing (or only available in
the wrong bitness). Show the error code to help diagnose the other
cases.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/winetest/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 75996d88147..107151c927f 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -135,8 +135,10 @@ static char * get_file_version(char * file_name)
             heap_free(data);
         } else
             sprintf(version, "version error %u", ERROR_OUTOFMEMORY);
-    } else
-        sprintf(version, "version not present");
+    } else if (GetLastError() == ERROR_FILE_NOT_FOUND)
+        sprintf(version, "dll is missing");
+    else
+        sprintf(version, "version not present %u", GetLastError());
 
     return version;
 }




More information about the wine-cvs mailing list