Module: wine Branch: master Commit: b80e7de8e047a9bf37f035145c36036be4bfb3b9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b80e7de8e047a9bf37f035145...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Mar 27 11:23:11 2019 +0100
shell32: Load wine_get_build_id() dynamically.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/shell32_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index a791966..99ee110 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -810,10 +810,12 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, { ABOUT_INFO *info = (ABOUT_INFO *)lParam; WCHAR template[512], buffer[512], version[64]; - extern const char *wine_get_build_id(void); + const char *(CDECL *wine_get_build_id)(void);
if (info) { + wine_get_build_id = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), + "wine_get_build_id"); SendDlgItemMessageW(hWnd, stc1, STM_SETICON,(WPARAM)info->hIcon, 0); GetWindowTextW( hWnd, template, ARRAY_SIZE(template) ); sprintfW( buffer, template, info->szApp ); @@ -822,9 +824,12 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT2), info->szOtherStuff ); GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), template, ARRAY_SIZE(template) ); - MultiByteToWideChar( CP_UTF8, 0, wine_get_build_id(), -1, version, ARRAY_SIZE(version) ); - sprintfW( buffer, template, version ); - SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), buffer ); + if (wine_get_build_id) + { + MultiByteToWideChar( CP_UTF8, 0, wine_get_build_id(), -1, version, ARRAY_SIZE(version) ); + sprintfW( buffer, template, version ); + SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), buffer ); + } hWndCtl = GetDlgItem(hWnd, IDC_ABOUT_LISTBOX); SendMessageW( hWndCtl, WM_SETREDRAW, 0, 0 ); SendMessageW( hWndCtl, WM_SETFONT, (WPARAM)info->hFont, 0 );