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
2f78666a
Commit
2f78666a
authored
Mar 30, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Add a helper to duplicate a devmode.
parent
5c4619d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
info.c
dlls/winspool.drv/info.c
+11
-9
No files found.
dlls/winspool.drv/info.c
View file @
2f78666a
...
...
@@ -338,6 +338,16 @@ static LPSTR strdupWtoA( LPCWSTR str )
return
ret
;
}
static
DEVMODEW
*
dup_devmode
(
const
DEVMODEW
*
dm
)
{
DEVMODEW
*
ret
;
if
(
!
dm
)
return
NULL
;
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dm
->
dmSize
+
dm
->
dmDriverExtra
);
if
(
ret
)
memcpy
(
ret
,
dm
,
dm
->
dmSize
+
dm
->
dmDriverExtra
);
return
ret
;
}
/******************************************************************
* verify, that the filename is a local file
*
...
...
@@ -2888,7 +2898,6 @@ BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level,
{
BOOL
ret
=
FALSE
;
job_t
*
job
;
DWORD
size
;
TRACE
(
"(%p, %d, %d, %p, %d)
\n
"
,
hPrinter
,
JobId
,
Level
,
pJob
,
Command
);
FIXME
(
"Ignoring everything other than document title
\n
"
);
...
...
@@ -2915,14 +2924,7 @@ BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level,
HeapFree
(
GetProcessHeap
(),
0
,
job
->
document_title
);
job
->
document_title
=
strdupW
(
info2
->
pDocument
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
devmode
);
if
(
info2
->
pDevMode
)
{
size
=
info2
->
pDevMode
->
dmSize
+
info2
->
pDevMode
->
dmDriverExtra
;
job
->
devmode
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
memcpy
(
job
->
devmode
,
info2
->
pDevMode
,
size
);
}
else
job
->
devmode
=
NULL
;
job
->
devmode
=
dup_devmode
(
info2
->
pDevMode
);
break
;
}
case
3
:
...
...
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