ReactOS 0.4.15-dev-7834-g00c4b3d
NtUserEnumDisplayMonitors.c File Reference
#include "../win32nt.h"
Include dependency graph for NtUserEnumDisplayMonitors.c:

Go to the source code of this file.

Functions

BOOL NTAPI NtUserEnumDisplayMonitors1 (HDC hDC, LPCRECT lprcClip, MONITORENUMPROC lpfnEnum, LPARAM dwData)
 
BOOL CALLBACK MonitorEnumProc (HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
 
 START_TEST (NtUserEnumDisplayMonitors)
 

Variables

ULONG gMonitorCount = 0
 
HDC ghdcMonitor = 0
 
RECT grcMonitor = {0}
 

Function Documentation

◆ MonitorEnumProc()

BOOL CALLBACK MonitorEnumProc ( HMONITOR  hMonitor,
HDC  hdcMonitor,
LPRECT  lprcMonitor,
LPARAM  dwData 
)

Definition at line 26 of file NtUserEnumDisplayMonitors.c.

31{
33 if (gMonitorCount == 1)
34 {
35 ghdcMonitor = hdcMonitor;
36 grcMonitor = *lprcMonitor;
37 }
38 return TRUE;
39}
ULONG gMonitorCount
RECT grcMonitor
#define TRUE
Definition: types.h:120

Referenced by START_TEST().

◆ NtUserEnumDisplayMonitors1()

BOOL NTAPI NtUserEnumDisplayMonitors1 ( HDC  hDC,
LPCRECT  lprcClip,
MONITORENUMPROC  lpfnEnum,
LPARAM  dwData 
)

Definition at line 16 of file NtUserEnumDisplayMonitors.c.

21{
22 return (INT)Syscall(L"NtUserEnumDisplayMonitors", 4, &hDC);
23}
static HDC hDC
Definition: 3dtext.c:33
#define L(x)
Definition: ntvdm.h:50
int32_t INT
Definition: typedefs.h:58
DWORD Syscall(LPWSTR pszFunction, int cParams, void *pParams)
Definition: w32knapi.c:90

◆ START_TEST()

START_TEST ( NtUserEnumDisplayMonitors  )

Definition at line 41 of file NtUserEnumDisplayMonitors.c.

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}
BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
#define NULL
Definition: types.h:112
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
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int ret

Variable Documentation

◆ ghdcMonitor

HDC ghdcMonitor = 0

Definition at line 11 of file NtUserEnumDisplayMonitors.c.

Referenced by MonitorEnumProc(), and START_TEST().

◆ gMonitorCount

ULONG gMonitorCount = 0

Definition at line 10 of file NtUserEnumDisplayMonitors.c.

Referenced by MonitorEnumProc(), and START_TEST().

◆ grcMonitor

RECT grcMonitor = {0}

Definition at line 12 of file NtUserEnumDisplayMonitors.c.

Referenced by MonitorEnumProc(), and START_TEST().