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
f4a99193
Commit
f4a99193
authored
Aug 09, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spoolss/tests: Fix a test on vista/w2k8.
parent
2bca1c86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
spoolss.c
dlls/spoolss/tests/spoolss.c
+25
-5
No files found.
dlls/spoolss/tests/spoolss.c
View file @
f4a99193
...
@@ -41,6 +41,7 @@ static DWORD (WINAPI * pSplInitializeWinSpoolDrv)(LPVOID *);
...
@@ -41,6 +41,7 @@ static DWORD (WINAPI * pSplInitializeWinSpoolDrv)(LPVOID *);
static
LPVOID
fn_spl
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_spl
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_w2k
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_w2k
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_xp
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_xp
[
WINSPOOL_TABLESIZE
];
static
LPVOID
fn_v
[
WINSPOOL_TABLESIZE
];
/* ########################### */
/* ########################### */
...
@@ -89,6 +90,18 @@ static LPCSTR load_functions(void)
...
@@ -89,6 +90,18 @@ static LPCSTR load_functions(void)
fn_xp
[
7
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
214
);
/* RefCntUnloadDriver */
fn_xp
[
7
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
214
);
/* RefCntUnloadDriver */
fn_xp
[
8
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
215
);
/* ForceUnloadDriver */
fn_xp
[
8
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
215
);
/* ForceUnloadDriver */
memset
(
fn_v
,
0xff
,
sizeof
(
fn_v
));
fn_v
[
0
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"OpenPrinterW"
);
fn_v
[
1
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"ClosePrinter"
);
fn_v
[
2
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"SpoolerDevQueryPrintW"
);
fn_v
[
3
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"SpoolerPrinterEvent"
);
fn_v
[
4
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"DocumentPropertiesW"
);
fn_v
[
5
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
212
);
/* LoadPrinterDriver */
fn_v
[
6
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
213
);
/* RefCntLoadDriver */
fn_v
[
7
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
214
);
/* RefCntUnloadDriver */
fn_v
[
8
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
215
);
/* ForceUnloadDriver */
fn_v
[
9
]
=
(
void
*
)
GetProcAddress
(
hwinspool
,
(
LPSTR
)
251
);
/* 0xfb */
return
NULL
;
return
NULL
;
}
}
...
@@ -124,21 +137,28 @@ static void test_BuildOtherNamesFromMachineName(void)
...
@@ -124,21 +137,28 @@ static void test_BuildOtherNamesFromMachineName(void)
static
void
test_SplInitializeWinSpoolDrv
(
VOID
)
static
void
test_SplInitializeWinSpoolDrv
(
VOID
)
{
{
LPVOID
*
fn_ref
=
fn_xp
;
DWORD
res
;
DWORD
res
;
LONG
id
;
LONG
id
;
BOOL
is_xp
;
memset
(
fn_spl
,
0xff
,
sizeof
(
fn_spl
));
memset
(
fn_spl
,
0xff
,
sizeof
(
fn_spl
));
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
res
=
pSplInitializeWinSpoolDrv
(
fn_spl
);
res
=
pSplInitializeWinSpoolDrv
(
fn_spl
);
ok
(
res
,
"got %u with %u (expected '!= 0')
\n
"
,
res
,
GetLastError
());
ok
(
res
,
"got %u with %u (expected '!= 0')
\n
"
,
res
,
GetLastError
());
/* functions 0 to 5 are the same with "spoolss.dll" from w2k and xp */
/* functions 0 to 5 are the same in "spoolss.dll" from w2k and above */
is_xp
=
(
fn_spl
[
6
]
==
fn_xp
[
6
]);
if
(
fn_spl
[
6
]
==
fn_w2k
[
6
])
{
fn_ref
=
fn_w2k
;
}
if
(
fn_spl
[
9
]
==
fn_v
[
9
])
{
fn_ref
=
fn_v
;
}
id
=
0
;
id
=
0
;
while
(
id
<
WINSPOOL_TABLESIZE
)
{
while
(
id
<
WINSPOOL_TABLESIZE
)
{
ok
(
fn_spl
[
id
]
==
(
is_xp
?
fn_xp
[
id
]
:
fn_w2k
[
id
]),
ok
(
fn_spl
[
id
]
==
fn_ref
[
id
],
"(#%02u) spoolss: %p, xp: %p, w2k: %p
\n
"
,
id
,
fn_spl
[
id
],
fn_xp
[
id
],
fn_w2k
[
id
]);
"(#%02u) spoolss: %p (vista: %p, xp: %p, w2k: %p)
\n
"
,
id
,
fn_spl
[
id
],
fn_v
[
id
],
fn_xp
[
id
],
fn_w2k
[
id
]);
id
++
;
id
++
;
}
}
}
}
...
...
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