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
547e97a4
Commit
547e97a4
authored
Mar 12, 2010
by
Huw Davies
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Retrieve the full printer name to avoid truncation when the name is…
wineps.drv: Retrieve the full printer name to avoid truncation when the name is 32 characters or longer.
parent
e18afef7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
init.c
dlls/wineps.drv/init.c
+5
-10
No files found.
dlls/wineps.drv/init.c
View file @
547e97a4
...
...
@@ -305,27 +305,22 @@ BOOL CDECL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWST
{
PSDRV_PDEVICE
*
physDev
;
PRINTERINFO
*
pi
;
char
*
deviceA
;
/* If no device name was specified, retrieve the device name
* from the
DEVMODE
structure from the DC's physDev.
* from the
PRINTERINFO
structure from the DC's physDev.
* (See CreateCompatibleDC) */
if
(
!
device
&&
*
pdev
)
{
physDev
=
*
pdev
;
deviceA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
CCHDEVICENAME
);
lstrcpynA
(
deviceA
,
(
LPCSTR
)
physDev
->
Devmode
->
dmPublic
.
dmDeviceName
,
CCHDEVICENAME
);
pi
=
PSDRV_FindPrinterInfo
((
*
pdev
)
->
pi
->
FriendlyName
);
}
else
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
device
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
deviceA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
char
*
deviceA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
device
,
-
1
,
deviceA
,
len
,
NULL
,
NULL
);
pi
=
PSDRV_FindPrinterInfo
(
deviceA
);
HeapFree
(
GetProcessHeap
(),
0
,
deviceA
);
}
pi
=
PSDRV_FindPrinterInfo
(
deviceA
);
HeapFree
(
GetProcessHeap
(),
0
,
deviceA
);
deviceA
=
NULL
;
TRACE
(
"(%s %s %s %p)
\n
"
,
debugstr_w
(
driver
),
debugstr_w
(
device
),
debugstr_w
(
output
),
initData
);
...
...
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