Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
ef78da2d
Commit
ef78da2d
authored
Oct 19, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl/tests: Another test for InitializePrintMonitor.
parent
04662b8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
localmon.c
dlls/localspl/tests/localmon.c
+27
-6
No files found.
dlls/localspl/tests/localmon.c
View file @
ef78da2d
...
...
@@ -35,19 +35,26 @@
/* ##### */
static
H
AND
LE
hdll
;
static
H
MODU
LE
hdll
;
static
LPMONITOREX
(
WINAPI
*
pInitializePrintMonitor
)(
LPWSTR
);
static
const
WCHAR
emptyW
[]
=
{
0
};
static
LPMONITOREX
pm
;
static
WCHAR
emptyW
[]
=
{
0
};
static
WCHAR
Monitors_LocalPortW
[]
=
{
\
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'P'
,
'r'
,
'i'
,
'n'
,
't'
,
'\\'
,
'M'
,
'o'
,
'n'
,
'i'
,
't'
,
'o'
,
'r'
,
's'
,
'\\'
,
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
' '
,
'P'
,
'o'
,
'r'
,
't'
,
0
};
/* ##### */
static
void
test_InitializePrintMonitor
(
void
)
{
LPMONITOREX
res
;
if
(
!
pInitializePrintMonitor
)
return
;
SetLastError
(
0xdeadbeef
);
res
=
pInitializePrintMonitor
(
NULL
);
ok
(
(
res
==
NULL
)
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
...
...
@@ -55,18 +62,32 @@ static void test_InitializePrintMonitor(void)
"ERROR_INVALID_PARAMETER)
\n
"
,
res
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
res
=
pInitializePrintMonitor
(
(
LPWSTR
)
emptyW
);
res
=
pInitializePrintMonitor
(
emptyW
);
ok
(
(
res
==
NULL
)
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"returned %p with %d
\n
(expected NULL with "
\
"ERROR_INVALID_PARAMETER)
\n
"
,
res
,
GetLastError
());
/* Every call with a non-empty string returns the same Pointer */
SetLastError
(
0xdeadbeef
);
res
=
pInitializePrintMonitor
(
Monitors_LocalPortW
);
ok
(
res
==
pm
,
"returned %p with %d (expected %p)
\n
"
,
res
,
GetLastError
(),
pm
);
}
START_TEST
(
localmon
)
{
/* This DLL does not exists on Win9x */
hdll
=
LoadLibraryA
(
"localspl.dll"
);
if
(
!
hdll
)
return
;
pInitializePrintMonitor
=
(
void
*
)
GetProcAddress
(
hdll
,
"InitializePrintMonitor"
);
if
(
!
pInitializePrintMonitor
)
return
;
/* Native localmon.dll / localspl.dll need a vaild Port-Entry in:
a) since xp: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports
b) upto w2k: Section "Ports" in win.ini
or InitializePrintMonitor fails. */
pm
=
pInitializePrintMonitor
(
Monitors_LocalPortW
);
test_InitializePrintMonitor
();
}
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