win32u: Pass the client instance to NtUserCreateWindowEx.

On 16-bit the module instance and client instance are different.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53568
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53646
This commit is contained in:
Sven Baars 2022-12-06 18:32:01 +01:00 committed by Alexandre Julliard
parent fc3b2ebaf4
commit f8a0716111
4 changed files with 6 additions and 6 deletions

View file

@ -399,7 +399,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
hwnd = NtUserCreateWindowEx( cs->dwExStyle, &class, NULL, &window_name, cs->style,
cs->x, cs->y, cs->cx, cs->cy, cs->hwndParent, menu, module,
cs->lpCreateParams, 0, NULL, 0, !unicode );
cs->lpCreateParams, 0, cs->hInstance, 0, !unicode );
if (!hwnd && menu && menu != cs->hMenu) NtUserDestroyMenu( menu );
if (!unicode && window_name.Buffer != name_buf) RtlFreeUnicodeString( &window_name );
return hwnd;

View file

@ -5022,7 +5022,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT cx, INT cy,
HWND parent, HMENU menu, HINSTANCE instance, void *params,
DWORD flags, CBT_CREATEWNDW *client_cbtc, DWORD unk, BOOL ansi )
DWORD flags, HINSTANCE client_instance, DWORD unk, BOOL ansi )
{
UINT win_dpi, thread_dpi = get_thread_dpi();
DPI_AWARENESS_CONTEXT context;
@ -5036,7 +5036,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
static const WCHAR messageW[] = {'M','e','s','s','a','g','e'};
cs.lpCreateParams = params;
cs.hInstance = instance;
cs.hInstance = client_instance ? client_instance : instance;
cs.hMenu = menu;
cs.hwndParent = parent;
cs.style = style;

View file

@ -1471,7 +1471,7 @@ NTSTATUS WINAPI wow64_NtUserCreateWindowEx( UINT *args )
HINSTANCE instance = get_handle( &args );
void *params = get_ptr( &args );
DWORD flags = get_ulong( &args );
void *cbtc = get_ptr( &args );
HINSTANCE client_instance = get_handle( &args );
DWORD unk = get_ulong( &args );
BOOL ansi = get_ulong( &args );
@ -1483,7 +1483,7 @@ NTSTATUS WINAPI wow64_NtUserCreateWindowEx( UINT *args )
unicode_str_32to64( &version, version32 ),
unicode_str_32to64( &window_name, window_name32 ),
style, x, y, width, height, parent, menu,
instance, params, flags, cbtc, unk, ansi );
instance, params, flags, client_instance, unk, ansi );
return HandleToUlong( ret );
}

View file

@ -678,7 +678,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT cx, INT cy,
HWND parent, HMENU menu, HINSTANCE instance, void *params,
DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi );
DWORD flags, HINSTANCE client_instance, DWORD unk, BOOL ansi );
HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y,