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
31fd0d5d
Commit
31fd0d5d
authored
Nov 25, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Nov 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: GetPrinterW and GetPrinterDriverW return the size in bytes so don't…
comdlg32: GetPrinterW and GetPrinterDriverW return the size in bytes so don't multiply by sizeof(WCHAR).
parent
49368cb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
printdlg.c
dlls/comdlg32/printdlg.c
+4
-4
No files found.
dlls/comdlg32/printdlg.c
View file @
31fd0d5d
...
...
@@ -1125,11 +1125,11 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
return
FALSE
;
}
GetPrinterW
(
hprn
,
2
,
NULL
,
0
,
&
needed
);
PrintStructures
->
lpPrinterInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
needed
);
PrintStructures
->
lpPrinterInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
GetPrinterW
(
hprn
,
2
,
(
LPBYTE
)
PrintStructures
->
lpPrinterInfo
,
needed
,
&
needed
);
GetPrinterDriverW
(
hprn
,
NULL
,
3
,
NULL
,
0
,
&
needed
);
PrintStructures
->
lpDriverInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
needed
);
PrintStructures
->
lpDriverInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
if
(
!
GetPrinterDriverW
(
hprn
,
NULL
,
3
,
(
LPBYTE
)
PrintStructures
->
lpDriverInfo
,
needed
,
&
needed
))
{
ERR
(
"GetPrinterDriverA failed for %s, fix your config!
\n
"
,
debugstr_w
(
PrintStructures
->
lpPrinterInfo
->
pPrinterName
));
...
...
@@ -2283,11 +2283,11 @@ BOOL WINAPI PrintDlgW(LPPRINTDLGW lppd)
}
GetPrinterW
(
hprn
,
2
,
NULL
,
0
,
&
needed
);
pbuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
needed
);
pbuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
GetPrinterW
(
hprn
,
2
,
(
LPBYTE
)
pbuf
,
needed
,
&
needed
);
GetPrinterDriverW
(
hprn
,
NULL
,
3
,
NULL
,
0
,
&
needed
);
dbuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
needed
);
dbuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
if
(
!
GetPrinterDriverW
(
hprn
,
NULL
,
3
,
(
LPBYTE
)
dbuf
,
needed
,
&
needed
))
{
ERR
(
"GetPrinterDriverA failed, le %d, fix your config for printer %s!
\n
"
,
GetLastError
(),
debugstr_w
(
pbuf
->
pPrinterName
));
...
...
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