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
fa63234b
Commit
fa63234b
authored
Dec 01, 2009
by
Jeremy White
Committed by
Alexandre Julliard
Dec 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Remove unvarying unicode parameter from WINSPOOL_GetDevModeFromReg.
parent
9d549a9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
info.c
dlls/winspool.drv/info.c
+8
-12
No files found.
dlls/winspool.drv/info.c
View file @
fa63234b
...
...
@@ -3320,8 +3320,7 @@ static void WINSPOOL_GetDefaultDevMode(
*/
static
BOOL
WINSPOOL_GetDevModeFromReg
(
HKEY
hkey
,
LPCWSTR
ValueName
,
LPBYTE
ptr
,
DWORD
buflen
,
DWORD
*
needed
,
BOOL
unicode
)
DWORD
buflen
,
DWORD
*
needed
)
{
DWORD
sz
=
buflen
,
type
;
LONG
ret
;
...
...
@@ -3337,13 +3336,11 @@ static BOOL WINSPOOL_GetDevModeFromReg(HKEY hkey, LPCWSTR ValueName,
/* ensures that dmSize is not erratically bogus if registry is invalid */
if
(
ptr
&&
((
DEVMODEA
*
)
ptr
)
->
dmSize
<
sizeof
(
DEVMODEA
))
((
DEVMODEA
*
)
ptr
)
->
dmSize
=
sizeof
(
DEVMODEA
);
if
(
unicode
)
{
sz
+=
(
CCHDEVICENAME
+
CCHFORMNAME
);
if
(
buflen
>=
sz
)
{
DEVMODEW
*
dmW
=
GdiConvertToDevmodeW
((
DEVMODEA
*
)
ptr
);
memcpy
(
ptr
,
dmW
,
sz
);
HeapFree
(
GetProcessHeap
(),
0
,
dmW
);
}
sz
+=
(
CCHDEVICENAME
+
CCHFORMNAME
);
if
(
buflen
>=
sz
)
{
DEVMODEW
*
dmW
=
GdiConvertToDevmodeW
((
DEVMODEA
*
)
ptr
);
memcpy
(
ptr
,
dmW
,
sz
);
HeapFree
(
GetProcessHeap
(),
0
,
dmW
);
}
*
needed
=
sz
;
return
TRUE
;
...
...
@@ -3469,8 +3466,7 @@ static BOOL WINSPOOL_GetPrinter_2(HKEY hkeyPrinter, PRINTER_INFO_2W *pi2,
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
if
(
WINSPOOL_GetDevModeFromReg
(
hkeyPrinter
,
Default_DevModeW
,
ptr
,
left
,
&
size
,
TRUE
))
{
if
(
WINSPOOL_GetDevModeFromReg
(
hkeyPrinter
,
Default_DevModeW
,
ptr
,
left
,
&
size
))
{
if
(
space
&&
size
<=
left
)
{
pi2
->
pDevMode
=
(
LPDEVMODEW
)
ptr
;
ptr
+=
size
;
...
...
@@ -3670,7 +3666,7 @@ static BOOL WINSPOOL_GetPrinter_9(HKEY hkeyPrinter, PRINTER_INFO_9W *pi9, LPBYTE
*
pcbNeeded
=
0
;
if
(
WINSPOOL_GetDevModeFromReg
(
hkeyPrinter
,
Default_DevModeW
,
buf
,
cbBuf
,
&
size
,
TRUE
))
{
if
(
WINSPOOL_GetDevModeFromReg
(
hkeyPrinter
,
Default_DevModeW
,
buf
,
cbBuf
,
&
size
))
{
if
(
space
&&
size
<=
cbBuf
)
{
pi9
->
pDevMode
=
(
LPDEVMODEW
)
buf
;
}
else
...
...
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