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
686cfe3a
Commit
686cfe3a
authored
Oct 19, 2016
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Add our driver for all usable Printer environments.
Signed-off-by:
Detlef Riekenberg
<
wine.dev@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b0c2cdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
info.c
dlls/winspool.drv/info.c
+19
-12
No files found.
dlls/winspool.drv/info.c
View file @
686cfe3a
...
...
@@ -583,31 +583,38 @@ WINSPOOL_SetDefaultPrinter(const char *devname, const char *name, BOOL force) {
static
BOOL
add_printer_driver
(
const
WCHAR
*
name
,
WCHAR
*
ppd
)
{
DRIVER_INFO_3W
di3
;
unsigned
int
i
;
BOOL
res
;
ZeroMemory
(
&
di3
,
sizeof
(
DRIVER_INFO_3W
));
di3
.
cVersion
=
3
;
di3
.
pName
=
(
WCHAR
*
)
name
;
di3
.
pEnvironment
=
envname_x86W
;
di3
.
pDriverPath
=
driver_nt
;
di3
.
pDataFile
=
ppd
;
di3
.
pConfigFile
=
driver_nt
;
di3
.
pDefaultDataType
=
rawW
;
if
(
AddPrinterDriverExW
(
NULL
,
3
,
(
LPBYTE
)
&
di3
,
APD_COPY_NEW_FILES
|
APD_COPY_FROM_DIRECTORY
)
||
(
GetLastError
()
==
ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
))
for
(
i
=
0
;
i
<
sizeof
(
all_printenv
)
/
sizeof
(
all_printenv
[
0
]);
i
++
)
{
di3
.
cVersion
=
0
;
di3
.
pEnvironment
=
envname_win40W
;
di3
.
pDriverPath
=
driver_9x
;
di3
.
pConfigFile
=
driver_9x
;
if
(
AddPrinterDriverExW
(
NULL
,
3
,
(
LPBYTE
)
&
di3
,
APD_COPY_NEW_FILES
|
APD_COPY_FROM_DIRECTORY
)
||
(
GetLastError
()
==
ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
))
di3
.
pEnvironment
=
(
WCHAR
*
)
all_printenv
[
i
]
->
envname
;
if
(
all_printenv
[
i
]
->
envname
==
envname_win40W
)
{
return
TRUE
;
/* We use wineps16.drv as driver for 16 bit */
di3
.
pDriverPath
=
driver_9x
;
di3
.
pConfigFile
=
driver_9x
;
}
res
=
AddPrinterDriverExW
(
NULL
,
3
,
(
LPBYTE
)
&
di3
,
APD_COPY_NEW_FILES
|
APD_COPY_FROM_DIRECTORY
);
TRACE
(
"got %d and %d for %s (%s)
\n
"
,
res
,
GetLastError
(),
debugstr_w
(
name
),
debugstr_w
(
di3
.
pEnvironment
));
if
(
!
res
&
(
GetLastError
()
!=
ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
))
{
ERR
(
"failed with %u for %s (%s) %s
\n
"
,
GetLastError
(),
debugstr_w
(
name
),
debugstr_w
(
di3
.
pEnvironment
),
debugstr_w
(
di3
.
pDriverPath
));
return
FALSE
;
}
}
ERR
(
"failed with %u for %s (%s)
\n
"
,
GetLastError
(),
debugstr_w
(
di3
.
pDriverPath
),
debugstr_w
(
di3
.
pEnvironment
));
return
FALS
E
;
return
TRU
E
;
}
static
inline
char
*
expand_env_string
(
char
*
str
,
DWORD
type
)
...
...
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