win32u: Move NtUserRemoveProp 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
32ea3ec7b3
commit
ed928dc49e
|
@ -170,18 +170,7 @@ HANDLE WINAPI RemovePropA( HWND hwnd, LPCSTR str )
|
|||
*/
|
||||
HANDLE WINAPI RemovePropW( HWND hwnd, LPCWSTR str )
|
||||
{
|
||||
ULONG_PTR ret = 0;
|
||||
|
||||
SERVER_START_REQ( remove_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 NtUserRemoveProp( hwnd, str );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ static void * const syscalls[] =
|
|||
NtUserOpenDesktop,
|
||||
NtUserOpenInputDesktop,
|
||||
NtUserOpenWindowStation,
|
||||
NtUserRemoveProp,
|
||||
NtUserSetObjectInformation,
|
||||
NtUserSetProcessWindowStation,
|
||||
NtUserSetProp,
|
||||
|
|
|
@ -52,6 +52,12 @@ static void test_window_props(void)
|
|||
prop = NtUserGetProp( hwnd, UlongToPtr(atom) );
|
||||
ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop );
|
||||
|
||||
prop = NtUserRemoveProp( hwnd, UlongToPtr(atom) );
|
||||
ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop );
|
||||
|
||||
prop = GetPropW(hwnd, L"test");
|
||||
ok(!prop, "prop = %p\n", prop);
|
||||
|
||||
GlobalDeleteAtom( atom );
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
|
|
@ -1148,7 +1148,7 @@
|
|||
@ stub NtUserRemoveClipboardFormatListener
|
||||
@ stub NtUserRemoveInjectionDevice
|
||||
@ stub NtUserRemoveMenu
|
||||
@ stub NtUserRemoveProp
|
||||
@ stdcall -syscall NtUserRemoveProp(long wstr)
|
||||
@ stub NtUserRemoveVisualIdentifier
|
||||
@ stub NtUserReportInertia
|
||||
@ stub NtUserRequestMoveSizeOperation
|
||||
|
|
|
@ -70,6 +70,30 @@ BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle )
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserRemoveProp (win32u.@)
|
||||
*
|
||||
* NOTE Native allows only ATOMs as the second argument. We allow strings
|
||||
* to save extra server call in RemovePropW.
|
||||
*/
|
||||
HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str )
|
||||
{
|
||||
ULONG_PTR ret = 0;
|
||||
|
||||
SERVER_START_REQ( remove_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;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* NtUserGetLayeredWindowAttributes (win32u.@)
|
||||
*/
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
SYSCALL_ENTRY( NtUserOpenDesktop ) \
|
||||
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
|
||||
SYSCALL_ENTRY( NtUserOpenWindowStation ) \
|
||||
SYSCALL_ENTRY( NtUserRemoveProp ) \
|
||||
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
|
||||
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
|
||||
SYSCALL_ENTRY( NtUserSetProp ) \
|
||||
|
|
|
@ -173,6 +173,14 @@ NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args )
|
|||
return NtUserSetProp( hwnd, str, handle );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
const WCHAR *str = get_ptr( &args );
|
||||
|
||||
return HandleToUlong( NtUserRemoveProp( hwnd, str ));
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
|
|
Loading…
Reference in New Issue