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
e1b9a5c8
Commit
e1b9a5c8
authored
Sep 13, 2010
by
Vitaly Perov
Committed by
Alexandre Julliard
Sep 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv: Set the printer name in AddJobW.
parent
b234bb49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
info.c
dlls/winspool.drv/info.c
+31
-0
No files found.
dlls/winspool.drv/info.c
View file @
e1b9a5c8
...
...
@@ -99,6 +99,7 @@ typedef struct {
WCHAR
*
filename
;
WCHAR
*
portname
;
WCHAR
*
document_title
;
WCHAR
*
printer_name
;
}
job_t
;
...
...
@@ -2296,6 +2297,7 @@ BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf, LPD
job
->
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
job
->
filename
,
filename
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
job
->
document_title
=
strdupW
(
default_doc_title
);
job
->
printer_name
=
strdupW
(
printer
->
name
);
list_add_tail
(
&
printer
->
queue
->
jobs
,
&
job
->
entry
);
*
pcbNeeded
=
(
len
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
*
addjob
);
...
...
@@ -7073,6 +7075,20 @@ static BOOL get_job_info_1(job_t *job, JOB_INFO_1W *ji1, LPBYTE buf, DWORD cbBuf
space
=
FALSE
;
*
pcbNeeded
+=
size
;
if
(
job
->
printer_name
)
{
string_to_buf
(
job
->
printer_name
,
ptr
,
left
,
&
size
,
unicode
);
if
(
space
&&
size
<=
left
)
{
ji1
->
pPrinterName
=
(
LPWSTR
)
ptr
;
ptr
+=
size
;
left
-=
size
;
}
else
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
return
space
;
}
...
...
@@ -7104,6 +7120,20 @@ static BOOL get_job_info_2(job_t *job, JOB_INFO_2W *ji2, LPBYTE buf, DWORD cbBuf
space
=
FALSE
;
*
pcbNeeded
+=
size
;
if
(
job
->
printer_name
)
{
string_to_buf
(
job
->
printer_name
,
ptr
,
left
,
&
size
,
unicode
);
if
(
space
&&
size
<=
left
)
{
ji2
->
pPrinterName
=
(
LPWSTR
)
ptr
;
ptr
+=
size
;
left
-=
size
;
}
else
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
return
space
;
}
...
...
@@ -7537,6 +7567,7 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID )
}
list_remove
(
cursor
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
document_title
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
printer_name
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
portname
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
filename
);
HeapFree
(
GetProcessHeap
(),
0
,
job
);
...
...
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