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
901969f6
Commit
901969f6
authored
Jun 20, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Jun 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Use const-correct GetPrinterDataEx() instead of GetPrinterData().
parent
da92dcec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
init.c
dlls/wineps.drv/init.c
+5
-7
No files found.
dlls/wineps.drv/init.c
View file @
901969f6
...
...
@@ -538,7 +538,6 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
char
*
ppdFileName
=
NULL
;
HKEY
hkey
;
BOOL
using_default_devmode
=
FALSE
;
static
CHAR
paper_size
[]
=
"Paper Size"
;
TRACE
(
"'%s'
\n
"
,
name
);
...
...
@@ -606,12 +605,11 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
}
#endif
if
(
!
ppdFileName
)
{
static
CHAR
ppd_file
[]
=
"PPD File"
;
res
=
GetPrinterDataA
(
hPrinter
,
ppd_file
,
NULL
,
NULL
,
0
,
&
needed
);
res
=
GetPrinterDataExA
(
hPrinter
,
"PrinterDriverData"
,
"PPD File"
,
NULL
,
NULL
,
0
,
&
needed
);
if
((
res
==
ERROR_SUCCESS
)
||
(
res
==
ERROR_MORE_DATA
))
{
ppdFileName
=
HeapAlloc
(
PSDRV_Heap
,
0
,
needed
);
res
=
GetPrinterDataA
(
hPrinter
,
ppd_file
,
&
ppdType
,
(
LPBYTE
)
ppdFileName
,
needed
,
&
needed
);
res
=
GetPrinterDataExA
(
hPrinter
,
"PrinterDriverData"
,
"PPD File"
,
&
ppdType
,
(
LPBYTE
)
ppdFileName
,
needed
,
&
needed
);
}
}
/* Look for a ppd file for this printer in the config file.
...
...
@@ -706,8 +704,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
* the Devmode structure, but Wine doesn't currently provide a convenient
* way to configure printers.
*/
res
=
GetPrinterData
A
(
hPrinter
,
paper_size
,
NULL
,
(
LPBYTE
)
&
dwPaperSize
,
sizeof
(
DWORD
),
&
needed
);
res
=
GetPrinterData
ExA
(
hPrinter
,
"PrinterDriverData"
,
"Paper Size"
,
NULL
,
(
LPBYTE
)
&
dwPaperSize
,
sizeof
(
DWORD
),
&
needed
);
if
(
res
==
ERROR_SUCCESS
)
pi
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmPaperSize
=
(
SHORT
)
dwPaperSize
;
else
if
(
res
==
ERROR_FILE_NOT_FOUND
)
...
...
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