ReactOS 0.4.16-dev-319-g6cf4263
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
12void
14{
15 HDWP hWinPosInfo;
16
17 hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e);
18 TEST(hWinPosInfo != 0);
19 TEST(EndDeferWindowPos(hWinPosInfo) != 0);
20
21}
22
23void
25{
26 HDC hDC = GetDC(NULL);
27 HWND hWnd;
28
30 TEST(hWnd != 0);
33
34}
35
36void
37Test_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
55void
57{
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
75void
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}
static HDC hDC
Definition: 3dtext.c:33
void Test_OneParamRoutine_WindowFromDC(void)
void Test_OneParamRoutine_CreateEmptyCurObject(void)
void Test_OneParamRoutine_BeginDeferWindowPos(void)
void Test_OneParamRoutine_MapDesktopObject(void)
void Test_OneParamRoutine_SwapMouseButtons(void)
#define START_TEST(x)
Definition: atltest.h:75
HWND hWnd
Definition: settings.c:17
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE HWND
Definition: compat.h:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxObject * pObject
BOOL NTAPI NtUserDestroyCursor(_In_ HANDLE Handle, _In_ BOOL bForce)
Definition: cursoricon.c:793
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:153
#define TEST(x)
Definition: precomp.h:20
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HICON hIcon
Definition: msconfig.c:44
#define BOOL
Definition: nt_native.h:43
#define _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT
Definition: w32knapi.h:63
#define _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON
Definition: w32knapi.h:64
#define _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT
Definition: w32knapi.h:62
BOOL WINAPI IsWindow(_In_opt_ HWND)
HMENU WINAPI CreateMenu(void)
Definition: menu.c:829
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyMenu(_In_ HMENU)