Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/win32u/tests/win32u.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 401913f0aee..51a84239dfb 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -505,6 +505,44 @@ static void test_window_text(void) DestroyWindow( hwnd ); }
+static void test_NtUserSetObjectInformation(void) +{ + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetProcessWindowStation(), -1, (void *)-1, -1UL ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetProcessWindowStation(), UOI_FLAGS, (void *)NULL, sizeof(USEROBJECTFLAGS) ); + todo_wine + ok( GetLastError() == ERROR_NOACCESS, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetThreadDesktop(GetCurrentThreadId()), UOI_FLAGS, (void *)NULL, sizeof(USEROBJECTFLAGS) ); + todo_wine + ok( GetLastError() == ERROR_NOACCESS, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)TRUE, 0 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)0xdeadbeef, 0xdeadbeef ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( GetCurrentProcess(), UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + NtUserSetObjectInformation( NULL, UOI_TIMERPROC_EXCEPTION_SUPPRESSION, (void *)-1, -1 ); + todo_wine + ok( GetLastError() == 0xdeadbeef, "NtUserSetObjectInformation error %lu\n", GetLastError() ); +} + START_TEST(win32u) { /* native win32u.dll fails if user32 is not loaded, so make sure it's fully initialized */ @@ -519,4 +557,5 @@ START_TEST(win32u) test_window_text();
test_NtUserCloseWindowStation(); + test_NtUserSetObjectInformation(); }