win32u: Move NtUserGetProp implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
97fa9db478
commit
32ea3ec7b3
|
@ -126,17 +126,7 @@ HANDLE WINAPI GetPropA( HWND hwnd, LPCSTR str )
|
|||
*/
|
||||
HANDLE WINAPI GetPropW( HWND hwnd, LPCWSTR str )
|
||||
{
|
||||
ULONG_PTR ret = 0;
|
||||
|
||||
SERVER_START_REQ( get_window_property )
|
||||
{
|
||||
req->window = wine_server_user_handle( hwnd );
|
||||
if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
|
||||
else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req )) ret = reply->data;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return (HANDLE)ret;
|
||||
return NtUserGetProp( hwnd, str );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ static void * const syscalls[] =
|
|||
NtUserGetLayeredWindowAttributes,
|
||||
NtUserGetObjectInformation,
|
||||
NtUserGetProcessWindowStation,
|
||||
NtUserGetProp,
|
||||
NtUserGetThreadDesktop,
|
||||
NtUserOpenDesktop,
|
||||
NtUserOpenInputDesktop,
|
||||
|
|
|
@ -49,6 +49,9 @@ static void test_window_props(void)
|
|||
prop = GetPropW( hwnd, L"test" );
|
||||
ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop );
|
||||
|
||||
prop = NtUserGetProp( hwnd, UlongToPtr(atom) );
|
||||
ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop );
|
||||
|
||||
GlobalDeleteAtom( atom );
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
|
|
@ -980,7 +980,7 @@
|
|||
@ stub NtUserGetProcessDpiAwarenessContext
|
||||
@ stub NtUserGetProcessUIContextInformation
|
||||
@ stdcall -syscall NtUserGetProcessWindowStation()
|
||||
@ stub NtUserGetProp
|
||||
@ stdcall -syscall NtUserGetProp(long wstr)
|
||||
@ stub NtUserGetQueueStatus
|
||||
@ stub NtUserGetQueueStatusReadonly
|
||||
@ stub NtUserGetRawInputBuffer
|
||||
|
|
|
@ -27,6 +27,27 @@
|
|||
#include "wine/server.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserGetProp (win32u.@)
|
||||
*
|
||||
* NOTE Native allows only ATOMs as the second argument. We allow strings
|
||||
* to save extra server call in GetPropW.
|
||||
*/
|
||||
HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str )
|
||||
{
|
||||
ULONG_PTR ret = 0;
|
||||
|
||||
SERVER_START_REQ( get_window_property )
|
||||
{
|
||||
req->window = wine_server_user_handle( hwnd );
|
||||
if (IS_INTRESOURCE(str)) req->atom = LOWORD(str);
|
||||
else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) );
|
||||
if (!wine_server_call_err( req )) ret = reply->data;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return (HANDLE)ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* NtUserSetProp (win32u.@)
|
||||
*
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
|
||||
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
|
||||
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
|
||||
SYSCALL_ENTRY( NtUserGetProp ) \
|
||||
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
|
||||
SYSCALL_ENTRY( NtUserOpenDesktop ) \
|
||||
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
|
||||
|
|
|
@ -156,6 +156,14 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args )
|
|||
return NtUserSetObjectInformation( handle, index, info, len );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserGetProp( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
const WCHAR *str = get_ptr( &args );
|
||||
|
||||
return HandleToUlong( NtUserGetProp( hwnd, str ));
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
|
|
Loading…
Reference in New Issue