2008-03-22 03:12:01 +00:00
|
|
|
|
|
|
|
INT
|
|
|
|
Test_OneParamRoutine_BeginDeferWindowPos(PTESTINFO pti) /* 0x1e */
|
|
|
|
{
|
|
|
|
HDWP hWinPosInfo;
|
|
|
|
|
|
|
|
hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e);
|
|
|
|
TEST(hWinPosInfo != 0);
|
|
|
|
TEST(EndDeferWindowPos(hWinPosInfo) != 0);
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
INT
|
|
|
|
Test_OneParamRoutine_WindowFromDC(PTESTINFO pti) /* 0x1f */
|
|
|
|
{
|
|
|
|
HDC hDC = GetDC(NULL);
|
|
|
|
HWND hWnd;
|
|
|
|
|
|
|
|
hWnd = (HWND)NtUserCallOneParam((DWORD)hDC, 0x1f);
|
|
|
|
TEST(hWnd != 0);
|
|
|
|
TEST(IsWindow(hWnd));
|
|
|
|
TEST(hWnd == GetDesktopWindow());
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
2010-07-14 14:56:53 +00:00
|
|
|
INT
|
|
|
|
Test_OneParamRoutine_CreateEmptyCurObject(PTESTINFO pti) /* XP/2k3 : 0x21, vista 0x25 */
|
|
|
|
{
|
|
|
|
HICON hIcon ;
|
|
|
|
|
|
|
|
/* Test 0 */
|
|
|
|
hIcon = (HICON) NtUserCallOneParam(0, _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT);
|
|
|
|
TEST(hIcon != NULL);
|
|
|
|
|
|
|
|
TEST(NtUserDestroyCursor(hIcon, 0) == TRUE);
|
|
|
|
|
|
|
|
/* Test Garbage */
|
|
|
|
hIcon = (HICON) NtUserCallOneParam(0xdeadbeef, _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT);
|
|
|
|
TEST(hIcon != NULL);
|
|
|
|
|
|
|
|
TEST(NtUserDestroyCursor(hIcon, 0xbaadf00d) == TRUE);
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
2008-03-22 03:12:01 +00:00
|
|
|
INT
|
|
|
|
Test_OneParamRoutine_MapDesktopObject(PTESTINFO pti) /* 0x30 */
|
|
|
|
{
|
|
|
|
DWORD pObject;
|
|
|
|
HWND hWnd;
|
|
|
|
HMENU hMenu;
|
|
|
|
|
|
|
|
hWnd = GetDesktopWindow();
|
|
|
|
pObject = NtUserCallOneParam((DWORD)hWnd, _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT);
|
|
|
|
TEST(pObject > 0);
|
|
|
|
TEST(pObject < 0x80000000);
|
|
|
|
|
|
|
|
hMenu = CreateMenu();
|
|
|
|
pObject = NtUserCallOneParam((DWORD)hMenu, _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT);
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
DestroyMenu(hMenu);
|
2008-03-22 03:12:01 +00:00
|
|
|
TEST(pObject > 0);
|
|
|
|
TEST(pObject < 0x80000000);
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
INT
|
|
|
|
Test_OneParamRoutine_SwapMouseButtons(PTESTINFO pti) /* 0x42 */
|
|
|
|
{
|
|
|
|
BOOL bInverse;
|
|
|
|
|
|
|
|
NtUserCallOneParam(TRUE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON);
|
|
|
|
bInverse = (BOOL)NtUserCallOneParam(FALSE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON);
|
|
|
|
TEST(bInverse == TRUE);
|
|
|
|
bInverse = (BOOL)NtUserCallOneParam(FALSE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON);
|
|
|
|
TEST(bInverse == FALSE);
|
|
|
|
|
|
|
|
// TODO: test other values
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
INT
|
|
|
|
Test_NtUserCallOneParam(PTESTINFO pti)
|
|
|
|
{
|
|
|
|
Test_OneParamRoutine_BeginDeferWindowPos(pti); /* 0x1e */
|
|
|
|
Test_OneParamRoutine_WindowFromDC(pti); /* 0x1f */
|
2010-07-14 14:56:53 +00:00
|
|
|
Test_OneParamRoutine_CreateEmptyCurObject(pti); /* XP/2k3 : 0x21, vista 0x25 */
|
2008-03-22 03:12:01 +00:00
|
|
|
Test_OneParamRoutine_MapDesktopObject(pti); /* 0x30 */
|
|
|
|
|
|
|
|
Test_OneParamRoutine_SwapMouseButtons(pti); /* 0x42 */
|
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|