Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
18517ca5
Commit
18517ca5
authored
Oct 11, 2005
by
Stefan Leichter
Committed by
Alexandre Julliard
Oct 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make user test loadable on NT4.
parent
9d7c5911
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
monitor.c
dlls/user/tests/monitor.c
+24
-7
No files found.
dlls/user/tests/monitor.c
View file @
18517ca5
...
...
@@ -23,6 +23,21 @@
#include "wingdi.h"
#include "winuser.h"
static
HMODULE
hdll
;
static
BOOL
(
WINAPI
*
pEnumDisplayMonitors
)(
HDC
,
LPRECT
,
MONITORENUMPROC
,
LPARAM
);
static
BOOL
(
WINAPI
*
pGetMonitorInfoA
)(
HMONITOR
,
LPMONITORINFO
);
static
void
init_function_pointers
(
void
)
{
hdll
=
GetModuleHandleA
(
"user32.dll"
);
if
(
hdll
)
{
pEnumDisplayMonitors
=
(
void
*
)
GetProcAddress
(
hdll
,
"EnumDisplayMonitors"
);
pGetMonitorInfoA
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetMonitorInfoA"
);
}
}
static
BOOL
CALLBACK
monitor_enum_proc
(
HMONITOR
hmon
,
HDC
hdc
,
LPRECT
lprc
,
LPARAM
lparam
)
{
...
...
@@ -31,7 +46,7 @@ static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc,
mi
.
cbSize
=
sizeof
(
mi
);
ok
(
GetMonitorInfoA
(
hmon
,
(
MONITORINFO
*
)
&
mi
),
"GetMonitorInfo failed
\n
"
);
ok
(
p
GetMonitorInfoA
(
hmon
,
(
MONITORINFO
*
)
&
mi
),
"GetMonitorInfo failed
\n
"
);
if
(
mi
.
dwFlags
==
MONITORINFOF_PRIMARY
)
strcpy
(
primary
,
mi
.
szDevice
);
...
...
@@ -61,17 +76,19 @@ static void test_enumdisplaydevices(void)
}
ok
(
primary_num
!=
-
1
,
"Didn't get the primary device
\n
"
);
ok
(
EnumDisplayMonitors
(
NULL
,
NULL
,
monitor_enum_proc
,
(
LPARAM
)
primary_monitor_device_name
),
"EnumDisplayMonitors failed
\n
"
);
if
(
pEnumDisplayMonitors
&&
pGetMonitorInfoA
)
{
ok
(
pEnumDisplayMonitors
(
NULL
,
NULL
,
monitor_enum_proc
,
(
LPARAM
)
primary_monitor_device_name
),
"EnumDisplayMonitors failed
\n
"
);
ok
(
!
strcmp
(
primary_monitor_device_name
,
primary_device_name
),
"monitor device name %s, device name %s
\n
"
,
primary_monitor_device_name
,
primary_device_name
);
ok
(
!
strcmp
(
primary_monitor_device_name
,
primary_device_name
),
"monitor device name %s, device name %s
\n
"
,
primary_monitor_device_name
,
primary_device_name
);
}
}
START_TEST
(
monitor
)
{
init_function_pointers
();
test_enumdisplaydevices
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment