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
62e017c9
Commit
62e017c9
authored
Dec 02, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Support Port handles in WritePrinter.
parent
6bb5bb44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
provider.c
dlls/localspl/provider.c
+21
-6
No files found.
dlls/localspl/provider.c
View file @
62e017c9
...
@@ -3223,23 +3223,38 @@ static DWORD WINAPI fpStartDocPrinter(HANDLE hprinter, DWORD level, BYTE *doc_in
...
@@ -3223,23 +3223,38 @@ static DWORD WINAPI fpStartDocPrinter(HANDLE hprinter, DWORD level, BYTE *doc_in
static
BOOL
WINAPI
fpWritePrinter
(
HANDLE
hprinter
,
void
*
buf
,
DWORD
size
,
DWORD
*
written
)
static
BOOL
WINAPI
fpWritePrinter
(
HANDLE
hprinter
,
void
*
buf
,
DWORD
size
,
DWORD
*
written
)
{
{
printer_t
*
printer
=
(
print
er_t
*
)
hprinter
;
handle_header_t
*
header
=
(
handle_head
er_t
*
)
hprinter
;
TRACE
(
"(%p, %p, %ld, %p)
\n
"
,
hprinter
,
buf
,
size
,
written
);
TRACE
(
"(%p, %p, %ld, %p)
\n
"
,
hprinter
,
buf
,
size
,
written
);
if
(
!
printer
||
printer
->
header
.
type
!=
HANDLE_PRINTER
)
if
(
!
header
)
{
{
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
if
(
!
printer
->
doc
)
if
(
header
->
type
==
HANDLE_PORT
)
{
{
SetLastError
(
ERROR_SPL_NO_STARTDOC
);
port_t
*
port
=
(
port_t
*
)
hprinter
;
return
FALSE
;
return
port
->
mon
->
monitor
.
pfnWritePort
(
port
->
hport
,
buf
,
size
,
written
);
}
if
(
header
->
type
==
HANDLE_PRINTER
)
{
printer_t
*
printer
=
(
printer_t
*
)
hprinter
;
if
(
!
printer
->
doc
)
{
SetLastError
(
ERROR_SPL_NO_STARTDOC
);
return
FALSE
;
}
return
WriteFile
(
printer
->
doc
->
hf
,
buf
,
size
,
written
,
NULL
);
}
}
return
WriteFile
(
printer
->
doc
->
hf
,
buf
,
size
,
written
,
NULL
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
}
static
BOOL
WINAPI
fpSetJob
(
HANDLE
hprinter
,
DWORD
job_id
,
static
BOOL
WINAPI
fpSetJob
(
HANDLE
hprinter
,
DWORD
job_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