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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2021-03-29 15:53:26 +02:00 committed by Alexandre Julliard
parent 44222dc9f2
commit 55f648fac9
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}