Commit d50112b4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for NtUserCreateWindowEx and NtUserDestroyWindow.

parent 43c851c7
...@@ -1136,10 +1136,8 @@ static struct unix_funcs unix_funcs = ...@@ -1136,10 +1136,8 @@ static struct unix_funcs unix_funcs =
NtGdiUnrealizeObject, NtGdiUnrealizeObject,
NtGdiUpdateColors, NtGdiUpdateColors,
NtGdiWidenPath, NtGdiWidenPath,
NtUserCreateWindowEx,
NtUserDeferWindowPosAndBand, NtUserDeferWindowPosAndBand,
NtUserDestroyMenu, NtUserDestroyMenu,
NtUserDestroyWindow,
NtUserDrawCaptionTemp, NtUserDrawCaptionTemp,
NtUserDrawMenuBarTemp, NtUserDrawMenuBarTemp,
NtUserEnableMenuItem, NtUserEnableMenuItem,
......
...@@ -127,11 +127,13 @@ static void * const syscalls[] = ...@@ -127,11 +127,13 @@ static void * const syscalls[] =
NtUserCreateCaret, NtUserCreateCaret,
NtUserCreateDesktopEx, NtUserCreateDesktopEx,
NtUserCreateInputContext, NtUserCreateInputContext,
NtUserCreateWindowEx,
NtUserCreateWindowStation, NtUserCreateWindowStation,
NtUserDeleteMenu, NtUserDeleteMenu,
NtUserDestroyAcceleratorTable, NtUserDestroyAcceleratorTable,
NtUserDestroyCursor, NtUserDestroyCursor,
NtUserDestroyInputContext, NtUserDestroyInputContext,
NtUserDestroyWindow,
NtUserDisableThreadIme, NtUserDisableThreadIme,
NtUserDispatchMessage, NtUserDispatchMessage,
NtUserDragDetect, NtUserDragDetect,
......
...@@ -814,7 +814,7 @@ ...@@ -814,7 +814,7 @@
@ stdcall -syscall NtUserCreateInputContext(ptr) @ stdcall -syscall NtUserCreateInputContext(ptr)
@ stub NtUserCreateLocalMemHandle @ stub NtUserCreateLocalMemHandle
@ stub NtUserCreatePalmRejectionDelayZone @ stub NtUserCreatePalmRejectionDelayZone
@ stdcall NtUserCreateWindowEx(long ptr ptr ptr long long long long long long long long ptr long long long long) @ stdcall -syscall NtUserCreateWindowEx(long ptr ptr ptr long long long long long long long long ptr long long long long)
@ stub NtUserCreateWindowGroup @ stub NtUserCreateWindowGroup
@ stdcall -syscall NtUserCreateWindowStation(ptr long long long long long long) @ stdcall -syscall NtUserCreateWindowStation(ptr long long long long long long)
@ stub NtUserCtxDisplayIOCtl @ stub NtUserCtxDisplayIOCtl
...@@ -834,7 +834,7 @@ ...@@ -834,7 +834,7 @@
@ stdcall -syscall NtUserDestroyInputContext(long) @ stdcall -syscall NtUserDestroyInputContext(long)
@ stdcall NtUserDestroyMenu(long) @ stdcall NtUserDestroyMenu(long)
@ stub NtUserDestroyPalmRejectionDelayZone @ stub NtUserDestroyPalmRejectionDelayZone
@ stdcall NtUserDestroyWindow(long) @ stdcall -syscall NtUserDestroyWindow(long)
@ stub NtUserDisableImmersiveOwner @ stub NtUserDisableImmersiveOwner
@ stub NtUserDisableProcessWindowFiltering @ stub NtUserDisableProcessWindowFiltering
@ stdcall -syscall NtUserDisableThreadIme(long) @ stdcall -syscall NtUserDisableThreadIme(long)
......
...@@ -186,16 +186,10 @@ struct unix_funcs ...@@ -186,16 +186,10 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT width, INT height,
HWND parent, HMENU menu, HINSTANCE instance, void *params,
DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi );
HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after, HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after,
INT x, INT y, INT cx, INT cy, INT x, INT y, INT cx, INT cy,
UINT flags, UINT unk1, UINT unk2 ); UINT flags, UINT unk1, UINT unk2 );
BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle );
BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd );
BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
HICON icon, const WCHAR *str, UINT flags ); HICON icon, const WCHAR *str, UINT flags );
DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font );
......
...@@ -725,18 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER ...@@ -725,18 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER
return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc );
} }
HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
DWORD style, INT x, INT y, INT width, INT height,
HWND parent, HMENU menu, HINSTANCE instance, void *params,
DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserCreateWindowEx( ex_style, class_name, version, window_name,
style, x, y, width, height, parent, menu,
instance, params, flags, cbtc, unk, ansi );
}
HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after,
INT x, INT y, INT cx, INT cy, INT x, INT y, INT cx, INT cy,
UINT flags, UINT unk1, UINT unk2 ) UINT flags, UINT unk1, UINT unk2 )
...@@ -752,12 +740,6 @@ BOOL WINAPI NtUserDestroyMenu( HMENU handle ) ...@@ -752,12 +740,6 @@ BOOL WINAPI NtUserDestroyMenu( HMENU handle )
return unix_funcs->pNtUserDestroyMenu( handle ); return unix_funcs->pNtUserDestroyMenu( handle );
} }
BOOL WINAPI NtUserDestroyWindow( HWND hwnd )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserDestroyWindow( hwnd );
}
BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
HICON icon, const WCHAR *str, UINT flags ) HICON icon, const WCHAR *str, UINT flags )
{ {
......
...@@ -114,11 +114,13 @@ ...@@ -114,11 +114,13 @@
SYSCALL_ENTRY( NtUserCreateCaret ) \ SYSCALL_ENTRY( NtUserCreateCaret ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
SYSCALL_ENTRY( NtUserCreateInputContext ) \ SYSCALL_ENTRY( NtUserCreateInputContext ) \
SYSCALL_ENTRY( NtUserCreateWindowEx ) \
SYSCALL_ENTRY( NtUserCreateWindowStation ) \ SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserDeleteMenu ) \ SYSCALL_ENTRY( NtUserDeleteMenu ) \
SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \
SYSCALL_ENTRY( NtUserDestroyCursor ) \ SYSCALL_ENTRY( NtUserDestroyCursor ) \
SYSCALL_ENTRY( NtUserDestroyInputContext ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \
SYSCALL_ENTRY( NtUserDestroyWindow ) \
SYSCALL_ENTRY( NtUserDisableThreadIme ) \ SYSCALL_ENTRY( NtUserDisableThreadIme ) \
SYSCALL_ENTRY( NtUserDispatchMessage ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \
SYSCALL_ENTRY( NtUserDragDetect ) \ SYSCALL_ENTRY( NtUserDragDetect ) \
......
...@@ -411,6 +411,38 @@ NTSTATUS WINAPI wow64_NtUserCreateInputContext( UINT *args ) ...@@ -411,6 +411,38 @@ NTSTATUS WINAPI wow64_NtUserCreateInputContext( UINT *args )
return HandleToUlong( NtUserCreateInputContext( client_ptr )); return HandleToUlong( NtUserCreateInputContext( client_ptr ));
} }
NTSTATUS WINAPI wow64_NtUserCreateWindowEx( UINT *args )
{
DWORD ex_style = get_ulong( &args );
UNICODE_STRING32 *class_name32 = get_ptr( &args );
UNICODE_STRING32 *version32 = get_ptr( &args );
UNICODE_STRING32 *window_name32 = get_ptr( &args );
DWORD style = get_ulong( &args );
int x = get_ulong( &args );
int y = get_ulong( &args );
int width = get_ulong( &args );
int height = get_ulong( &args );
HWND parent = get_handle( &args );
HMENU menu = get_handle( &args );
HINSTANCE instance = get_handle( &args );
void *params = get_ptr( &args );
DWORD flags = get_ulong( &args );
void *cbtc = get_ptr( &args );
DWORD unk = get_ulong( &args );
BOOL ansi = get_ulong( &args );
UNICODE_STRING class_name, version, window_name;
HWND ret;
ret = NtUserCreateWindowEx( ex_style,
unicode_str_32to64( &class_name, class_name32),
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 );
return HandleToUlong( ret );
}
NTSTATUS WINAPI wow64_NtUserCreateWindowStation( UINT *args ) NTSTATUS WINAPI wow64_NtUserCreateWindowStation( UINT *args )
{ {
OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
...@@ -458,6 +490,13 @@ NTSTATUS WINAPI wow64_NtUserDestroyInputContext( UINT *args ) ...@@ -458,6 +490,13 @@ NTSTATUS WINAPI wow64_NtUserDestroyInputContext( UINT *args )
return NtUserDestroyInputContext( handle ); return NtUserDestroyInputContext( handle );
} }
NTSTATUS WINAPI wow64_NtUserDestroyWindow( UINT *args )
{
HWND hwnd = get_handle( &args );
return NtUserDestroyWindow( hwnd );
}
NTSTATUS WINAPI wow64_NtUserDisableThreadIme( UINT *args ) NTSTATUS WINAPI wow64_NtUserDisableThreadIme( UINT *args )
{ {
DWORD thread_id = get_ulong( &args ); DWORD thread_id = get_ulong( &args );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment