1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

user32: Load dynamically wine_get_version().

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2024-01-02 11:50:58 +01:00 committed by Alexandre Julliard
parent d40a0d8a1d
commit 20b4cdde55

View file

@ -159,12 +159,16 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
if (hmodule)
{
BOOL (WINAPI *aboutproc)(HWND, LPCSTR, LPCSTR, HICON);
extern const char * CDECL wine_get_version(void);
const char * (CDECL *p_wine_get_version)(void);
char app[256];
sprintf( app, "Wine %s", wine_get_version() );
p_wine_get_version = (void *)GetProcAddress( GetModuleHandleW(L"ntdll.dll"), "wine_get_version" );
aboutproc = (void *)GetProcAddress( hmodule, "ShellAboutA" );
if (aboutproc) aboutproc( hwnd, app, NULL, 0 );
if (p_wine_get_version && aboutproc)
{
snprintf( app, ARRAY_SIZE(app), "Wine %s", p_wine_get_version() );
aboutproc( hwnd, app, NULL, 0 );
}
FreeLibrary( hmodule );
}
}