Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2feb43f5
Commit
2feb43f5
authored
Nov 24, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Nov 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Add a test showing Windows behavior wrt size and GetPrinterDriverA.
This behavior was discovered by Huw Davies.
parent
abb23d8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
info.c
dlls/winspool.drv/tests/info.c
+11
-0
No files found.
dlls/winspool.drv/tests/info.c
View file @
2feb43f5
...
...
@@ -70,6 +70,7 @@ static BOOL (WINAPI * pGetDefaultPrinterA)(LPSTR, LPDWORD);
static
BOOL
(
WINAPI
*
pSetDefaultPrinterA
)(
LPCSTR
);
static
DWORD
(
WINAPI
*
pXcvDataW
)(
HANDLE
,
LPCWSTR
,
PBYTE
,
DWORD
,
PBYTE
,
DWORD
,
PDWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pAddPortExA
)(
LPSTR
,
DWORD
,
LPBYTE
,
LPSTR
);
static
BOOL
(
WINAPI
*
pGetPrinterDriverW
)(
HANDLE
,
LPWSTR
,
DWORD
,
LPBYTE
,
DWORD
,
LPDWORD
);
/* ################################ */
...
...
@@ -2260,6 +2261,15 @@ static void test_GetPrinterDriver(void)
continue
;
}
/* GetPrinterDriverA returns the same number of bytes as GetPrinterDriverW */
if
(
!
ret
&&
pGetPrinterDriverW
)
{
DWORD
double_needed
;
ret
=
pGetPrinterDriverW
(
hprn
,
NULL
,
level
,
NULL
,
0
,
&
double_needed
);
todo_wine
ok
(
double_needed
==
needed
,
"GetPrinterDriverA returned different size %d than GetPrinterDriverW (%d)
\n
"
,
needed
,
double_needed
);
}
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -2536,6 +2546,7 @@ START_TEST(info)
hwinspool
=
GetModuleHandleA
(
"winspool.drv"
);
pGetDefaultPrinterA
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"GetDefaultPrinterA"
);
pSetDefaultPrinterA
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"SetDefaultPrinterA"
);
pGetPrinterDriverW
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"GetPrinterDriverW"
);
pXcvDataW
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"XcvDataW"
);
pAddPortExA
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"AddPortExA"
);
...
...
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