ReactOS  0.4.13-dev-52-g0efcfec
NtUserCallOneParam.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: Test for NtUserCallOneParam
5  * PROGRAMMERS:
6  */
7 
8 #include <win32nt.h>
9 
10 
11 
12 void
14 {
15  HDWP hWinPosInfo;
16 
17  hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e);
18  TEST(hWinPosInfo != 0);
19  TEST(EndDeferWindowPos(hWinPosInfo) != 0);
20 
21 }
22 
23 void
25 {
26  HDC hDC = GetDC(NULL);
27  HWND hWnd;
28 
30  TEST(hWnd != 0);
31  TEST(IsWindow(hWnd));
33 
34 }
35 
36 void
37 Test_OneParamRoutine_CreateEmptyCurObject(void) /* XP/2k3 : 0x21, vista 0x25 */
38 {
39  HICON hIcon ;
40 
41  /* Test 0 */
43  TEST(hIcon != NULL);
44 
46 
47  /* Test Garbage */
49  TEST(hIcon != NULL);
50 
51  TEST(NtUserDestroyCursor(hIcon, 0xbaadf00d) == TRUE);
52 
53 }
54 
55 void
57 {
58  DWORD pObject;
59  HWND hWnd;
60  HMENU hMenu;
61 
64  TEST(pObject > 0);
65  TEST(pObject < 0x80000000);
66 
67  hMenu = CreateMenu();
69  DestroyMenu(hMenu);
70  TEST(pObject > 0);
71  TEST(pObject < 0x80000000);
72 
73 }
74 
75 void
77 {
78  BOOL bInverse;
79 
82  TEST(bInverse == TRUE);
84  TEST(bInverse == FALSE);
85 
86  // TODO: test other values
87 }
88 
90 {
93  Test_OneParamRoutine_CreateEmptyCurObject(); /* XP/2k3 : 0x21, vista 0x25 */
96 }
HMENU WINAPI CreateMenu(void)
Definition: menu.c:837
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
void Test_OneParamRoutine_SwapMouseButtons(void)
BOOL WINAPI IsWindow(_In_opt_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL NTAPI NtUserDestroyCursor(_In_ HANDLE Handle, _In_ BOOL bForce)
Definition: cursoricon.c:793
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
HANDLE HWND
Definition: compat.h:13
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
#define BOOL
Definition: nt_native.h:43
unsigned int BOOL
Definition: ntddk_ex.h:94
void Test_OneParamRoutine_MapDesktopObject(void)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:622
#define _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT
Definition: w32knapi.h:64
START_TEST(NtUserCallOneParam)
#define _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON
Definition: w32knapi.h:65
#define TEST(x)
Definition: precomp.h:20
void Test_OneParamRoutine_CreateEmptyCurObject(void)
unsigned long DWORD
Definition: ntddk_ex.h:95
void Test_OneParamRoutine_BeginDeferWindowPos(void)
BOOL WINAPI DestroyMenu(_In_ HMENU)
static HDC hDC
Definition: 3dtext.c:33
void Test_OneParamRoutine_WindowFromDC(void)
HICON hIcon
Definition: msconfig.c:44
#define _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT
Definition: w32knapi.h:63
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60