ReactOS  0.4.15-dev-2155-g06f57e1
NtUserCallOneParam.c File Reference
#include <win32nt.h>
Include dependency graph for NtUserCallOneParam.c:

Go to the source code of this file.

Functions

void Test_OneParamRoutine_BeginDeferWindowPos (void)
 
void Test_OneParamRoutine_WindowFromDC (void)
 
void Test_OneParamRoutine_CreateEmptyCurObject (void)
 
void Test_OneParamRoutine_MapDesktopObject (void)
 
void Test_OneParamRoutine_SwapMouseButtons (void)
 
 START_TEST (NtUserCallOneParam)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtUserCallOneParam  )

Definition at line 89 of file NtUserCallOneParam.c.

90 {
93  Test_OneParamRoutine_CreateEmptyCurObject(); /* XP/2k3 : 0x21, vista 0x25 */
96 }
void Test_OneParamRoutine_SwapMouseButtons(void)
void Test_OneParamRoutine_MapDesktopObject(void)
void Test_OneParamRoutine_CreateEmptyCurObject(void)
void Test_OneParamRoutine_BeginDeferWindowPos(void)
void Test_OneParamRoutine_WindowFromDC(void)

◆ Test_OneParamRoutine_BeginDeferWindowPos()

void Test_OneParamRoutine_BeginDeferWindowPos ( void  )

Definition at line 13 of file NtUserCallOneParam.c.

14 {
15  HDWP hWinPosInfo;
16 
17  hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e);
18  TEST(hWinPosInfo != 0);
19  TEST(EndDeferWindowPos(hWinPosInfo) != 0);
20 
21 }
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define TEST(x)
Definition: precomp.h:20

Referenced by START_TEST().

◆ Test_OneParamRoutine_CreateEmptyCurObject()

void Test_OneParamRoutine_CreateEmptyCurObject ( void  )

Definition at line 37 of file NtUserCallOneParam.c.

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 }
static HICON
Definition: imagelist.c:84
BOOL NTAPI NtUserDestroyCursor(_In_ HANDLE Handle, _In_ BOOL bForce)
Definition: cursoricon.c:793
#define TRUE
Definition: types.h:120
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
#define TEST(x)
Definition: precomp.h:20
HICON hIcon
Definition: msconfig.c:44
#define NULL
Definition: types.h:112
#define _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT
Definition: w32knapi.h:63

Referenced by START_TEST().

◆ Test_OneParamRoutine_MapDesktopObject()

void Test_OneParamRoutine_MapDesktopObject ( void  )

Definition at line 56 of file NtUserCallOneParam.c.

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 }
HMENU WINAPI CreateMenu(void)
Definition: menu.c:837
FxObject * pObject
HWND hWnd
Definition: settings.c:17
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
#define _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT
Definition: w32knapi.h:64
#define TEST(x)
Definition: precomp.h:20
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI DestroyMenu(_In_ HMENU)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by START_TEST().

◆ Test_OneParamRoutine_SwapMouseButtons()

void Test_OneParamRoutine_SwapMouseButtons ( void  )

Definition at line 76 of file NtUserCallOneParam.c.

77 {
78  BOOL bInverse;
79 
82  TEST(bInverse == TRUE);
84  TEST(bInverse == FALSE);
85 
86  // TODO: test other values
87 }
#define TRUE
Definition: types.h:120
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
#define BOOL
Definition: nt_native.h:43
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON
Definition: w32knapi.h:65
#define TEST(x)
Definition: precomp.h:20

Referenced by START_TEST().

◆ Test_OneParamRoutine_WindowFromDC()

void Test_OneParamRoutine_WindowFromDC ( void  )

Definition at line 24 of file NtUserCallOneParam.c.

25 {
26  HDC hDC = GetDC(NULL);
27  HWND hWnd;
28 
30  TEST(hWnd != 0);
31  TEST(IsWindow(hWnd));
33 
34 }
BOOL WINAPI IsWindow(_In_opt_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
HANDLE HWND
Definition: compat.h:19
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:145
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
#define TEST(x)
Definition: precomp.h:20
unsigned long DWORD
Definition: ntddk_ex.h:95
static HDC hDC
Definition: 3dtext.c:33
#define NULL
Definition: types.h:112

Referenced by START_TEST().