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
604e7b4e
Commit
604e7b4e
authored
Nov 28, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Add printer port redirection extension.
parent
6be2138d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
provider.c
dlls/localspl/provider.c
+17
-3
No files found.
dlls/localspl/provider.c
View file @
604e7b4e
...
...
@@ -3240,6 +3240,7 @@ static BOOL WINAPI fpScheduleJob(HANDLE hprinter, DWORD job_id)
BOOL
ret_startdoc
=
FALSE
,
ret_open
=
FALSE
,
ret
=
TRUE
;
printer_t
*
printer
=
(
printer_t
*
)
hprinter
;
const
WCHAR
*
port_name
,
*
port
;
WCHAR
output
[
1024
];
DOC_INFO_1W
info
;
monitor_t
*
mon
;
BYTE
buf
[
4096
];
...
...
@@ -3247,6 +3248,7 @@ static BOOL WINAPI fpScheduleJob(HANDLE hprinter, DWORD job_id)
DWORD
r
,
w
;
job_t
*
job
;
HANDLE
hf
;
HKEY
hkey
;
TRACE
(
"%p %ld
\n
"
,
hprinter
,
job_id
);
...
...
@@ -3280,10 +3282,22 @@ static BOOL WINAPI fpScheduleJob(HANDLE hprinter, DWORD job_id)
}
/* TODO: use print processor */
if
(
isalpha
(
port
[
0
])
&&
port
[
1
]
==
':'
)
port_name
=
port
;
if
((
isalpha
(
port
[
0
])
&&
port
[
1
]
==
':'
)
||
!
wcsncmp
(
port
,
L"FILE:"
,
ARRAY_SIZE
(
L"FILE:"
)
-
1
))
{
port_name
=
L"FILE:"
;
else
port_name
=
port
;
}
else
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Software
\\
Wine
\\
Printing
\\
Spooler"
,
&
hkey
))
{
DWORD
type
,
count
=
sizeof
(
output
);
if
(
!
RegQueryValueExW
(
hkey
,
port
,
NULL
,
&
type
,
(
BYTE
*
)
output
,
&
count
))
{
TRACE
(
"overriding port %s -> %s
\n
"
,
debugstr_w
(
port
),
debugstr_w
(
output
));
port_name
=
output
;
}
RegCloseKey
(
hkey
);
}
if
(
!
(
mon
=
monitor_load_by_port
(
port_name
))
||
!
mon
->
monitor
.
pfnOpenPort
||
!
mon
->
monitor
.
pfnStartDocPort
||
!
mon
->
monitor
.
pfnWritePort
||
...
...
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