ReactOS 0.4.15-dev-8393-g61b7fb9
NtUserEnumDisplayMonitors.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 NtUserEnumDisplayMonitors
5 * PROGRAMMERS:
6 */
7
8#include "../win32nt.h"
9
13
14BOOL
17 HDC hDC,
18 LPCRECT lprcClip,
19 MONITORENUMPROC lpfnEnum,
21{
22 return (INT)Syscall(L"NtUserEnumDisplayMonitors", 4, &hDC);
23}
24
27 HMONITOR hMonitor,
28 HDC hdcMonitor,
29 LPRECT lprcMonitor,
31{
33 if (gMonitorCount == 1)
34 {
35 ghdcMonitor = hdcMonitor;
36 grcMonitor = *lprcMonitor;
37 }
38 return TRUE;
39}
40
42{
43 BOOL ret;
44
45 // WILL crash!
46// TEST(NtUserEnumDisplayMonitors1(NULL, NULL, NULL, 0) == 0);
47
49 TEST(ret == TRUE);
51 TEST(ghdcMonitor == 0);
52 TEST(grcMonitor.left == 0);
54 TEST(grcMonitor.top == 0);
56
57}
static HDC hDC
Definition: 3dtext.c:33
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
ULONG gMonitorCount
RECT grcMonitor
BOOL NTAPI NtUserEnumDisplayMonitors1(HDC hDC, LPCRECT lprcClip, MONITORENUMPROC lpfnEnum, LPARAM dwData)
#define START_TEST(x)
Definition: atltest.h:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
INT NTAPI NtUserEnumDisplayMonitors(OPTIONAL IN HDC hDC, OPTIONAL IN LPCRECT pRect, OPTIONAL OUT HMONITOR *hMonitorList, OPTIONAL OUT LPRECT monitorRectList, OPTIONAL IN DWORD listSize)
#define TEST(x)
Definition: precomp.h:20
static HDC
Definition: imagelist.c:92
static HANDLE ULONG_PTR dwData
Definition: file.c:35
#define L(x)
Definition: ntvdm.h:50
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define NTAPI
Definition: typedefs.h:36
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
DWORD Syscall(LPWSTR pszFunction, int cParams, void *pParams)
Definition: w32knapi.c:90
int ret
LONG_PTR LPARAM
Definition: windef.h:208
BOOL(CALLBACK * MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM)
Definition: winuser.h:2909