Module: wine Branch: master Commit: d40a0d8a1d881f5c54c2d336faee545f70ab1bea URL: https://gitlab.winehq.org/wine/wine/-/commit/d40a0d8a1d881f5c54c2d336faee545...
Author: Eric Pouech epouech@codeweavers.com Date: Tue Jan 2 11:48:50 2024 +0100
appwiz.cpl: Load dynamically wine_get_version().
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/appwiz.cpl/addons.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index a2957c3040a..88f871be53b 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -108,8 +108,7 @@ static LPWSTR url = NULL; static IBinding *dwl_binding; static WCHAR *msi_file;
-extern const char * CDECL wine_get_version(void); - +static const char * (CDECL *p_wine_get_version)(void); static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*);
static BOOL sha_check(const WCHAR *file_name) @@ -610,7 +609,7 @@ static void append_url_params( WCHAR *url ) len += MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len)-1; lstrcpyW(url+len, L"&winev="); len += lstrlenW(L"&winev="); - MultiByteToWideChar(CP_ACP, 0, wine_get_version(), -1, url+len, size/sizeof(WCHAR)-len); + MultiByteToWideChar(CP_ACP, 0, p_wine_get_version() ? p_wine_get_version() : 0, -1, url+len, size/sizeof(WCHAR)-len); }
static LPWSTR get_url(void) @@ -751,6 +750,7 @@ BOOL install_addon(addon_t addon_type) addon = addons_info+addon_type;
p_wine_get_dos_file_name = (void *)GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "wine_get_dos_file_name"); + p_wine_get_version = (void *)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "wine_get_version");
/* * Try to find addon .msi file in following order: