user32: Load dynamically wine_get_version().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
d40a0d8a1d
commit
20b4cdde55
1 changed files with 7 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue