mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[User32|API_TEST] Add Get Window Ptr Test
Adding test to verify results from a foreign window process. See CORE-17856.
This commit is contained in:
parent
9cff384c22
commit
993eb07654
1 changed files with 22 additions and 0 deletions
|
@ -135,6 +135,27 @@ static void test_wndproc(void)
|
|||
"UnregisterClassA() failed: LastError = %lu\n", GetLastError());
|
||||
}
|
||||
|
||||
static void test_get_wndproc(void)
|
||||
{
|
||||
LONG_PTR ret;
|
||||
SetLastError(0xfeedf00d);
|
||||
ret = GetWindowLongPtrA(GetShellWindow(), GWLP_WNDPROC);
|
||||
ok (ret == 0, "Should return NULL\n");
|
||||
ok (GetLastError() == ERROR_ACCESS_DENIED, "Wrong return error!\n");
|
||||
SetLastError(0xfeedf00d);
|
||||
ret = GetWindowLongPtrW(GetShellWindow(), GWLP_WNDPROC);
|
||||
ok (ret == 0, "Should return NULL\n");
|
||||
ok (GetLastError() == ERROR_ACCESS_DENIED, "Wrong return error!\n");
|
||||
SetLastError(0xfeedf00d);
|
||||
ret = GetWindowLongPtrA(GetShellWindow(), GWLP_WNDPROC);
|
||||
ok (ret == 0, "Should return NULL\n");
|
||||
ok (GetLastError() == ERROR_ACCESS_DENIED, "Wrong return error!\n");
|
||||
SetLastError(0xfeedf00d);
|
||||
ret = GetWindowLongPtrW(GetShellWindow(), GWLP_WNDPROC);
|
||||
ok (ret == 0, "Should return NULL\n");
|
||||
ok (GetLastError() == ERROR_ACCESS_DENIED, "Wrong return error!\n");
|
||||
}
|
||||
|
||||
START_TEST(WndProc)
|
||||
{
|
||||
#ifdef __RUNTIME_CHECKS__
|
||||
|
@ -142,5 +163,6 @@ START_TEST(WndProc)
|
|||
return;
|
||||
#endif /* __RUNTIME_CHECKS__ */
|
||||
|
||||
test_get_wndproc();
|
||||
test_wndproc();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue