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
dc8d7e7d
Commit
dc8d7e7d
authored
Feb 12, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv: There is no need to speculate about wineps.drv default DEVMODE.
parent
ac79a3f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
58 deletions
+15
-58
info.c
dlls/winspool.drv/info.c
+14
-57
info.c
dlls/winspool.drv/tests/info.c
+1
-1
No files found.
dlls/winspool.drv/info.c
View file @
dc8d7e7d
...
...
@@ -3986,63 +3986,20 @@ static BOOL WINSPOOL_GetStringFromReg(HKEY hkey, LPCWSTR ValueName, LPBYTE ptr,
* WINSPOOL_GetDefaultDevMode
*
* Get a default DevMode values for wineps.
* FIXME - use ppd.
*/
static
void
WINSPOOL_GetDefaultDevMode
(
LPBYTE
ptr
,
DWORD
buflen
,
DWORD
*
needed
)
{
DEVMODEW
dm
;
static
const
WCHAR
szWwps
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'p'
,
's'
,
'.'
,
'd'
,
'r'
,
'v'
,
0
};
/* fill default DEVMODE - should be read from ppd... */
ZeroMemory
(
&
dm
,
sizeof
(
dm
)
);
memcpy
(
dm
.
dmDeviceName
,
szWwps
,
sizeof
szWwps
);
dm
.
dmSpecVersion
=
DM_SPECVERSION
;
dm
.
dmDriverVersion
=
1
;
dm
.
dmSize
=
sizeof
(
DEVMODEW
);
dm
.
dmDriverExtra
=
0
;
dm
.
dmFields
=
DM_ORIENTATION
|
DM_PAPERSIZE
|
DM_PAPERLENGTH
|
DM_PAPERWIDTH
|
DM_SCALE
|
DM_COPIES
|
DM_DEFAULTSOURCE
|
DM_PRINTQUALITY
|
DM_YRESOLUTION
|
DM_TTOPTION
;
dm
.
u1
.
s1
.
dmOrientation
=
DMORIENT_PORTRAIT
;
dm
.
u1
.
s1
.
dmPaperSize
=
DMPAPER_A4
;
dm
.
u1
.
s1
.
dmPaperLength
=
2970
;
dm
.
u1
.
s1
.
dmPaperWidth
=
2100
;
dm
.
u1
.
s1
.
dmScale
=
100
;
dm
.
u1
.
s1
.
dmCopies
=
1
;
dm
.
u1
.
s1
.
dmDefaultSource
=
DMBIN_AUTO
;
dm
.
u1
.
s1
.
dmPrintQuality
=
DMRES_MEDIUM
;
/* dm.dmColor */
/* dm.dmDuplex */
dm
.
dmYResolution
=
300
;
/* 300dpi */
dm
.
dmTTOption
=
DMTT_BITMAP
;
/* dm.dmCollate */
/* dm.dmFormName */
/* dm.dmLogPixels */
/* dm.dmBitsPerPel */
/* dm.dmPelsWidth */
/* dm.dmPelsHeight */
/* dm.u2.dmDisplayFlags */
/* dm.dmDisplayFrequency */
/* dm.dmICMMethod */
/* dm.dmICMIntent */
/* dm.dmMediaType */
/* dm.dmDitherType */
/* dm.dmReserved1 */
/* dm.dmReserved2 */
/* dm.dmPanningWidth */
/* dm.dmPanningHeight */
if
(
buflen
>=
sizeof
(
DEVMODEW
))
memcpy
(
ptr
,
&
dm
,
sizeof
(
DEVMODEW
));
*/
static
void
WINSPOOL_GetDefaultDevMode
(
LPBYTE
ptr
,
DWORD
buflen
,
DWORD
*
needed
)
{
static
const
WCHAR
winepsW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'p'
,
's'
,
'.'
,
'd'
,
'r'
,
'v'
,
0
};
if
(
buflen
>=
sizeof
(
DEVMODEW
))
{
DEVMODEW
*
dm
=
(
DEVMODEW
*
)
ptr
;
/* the driver will update registry with real values */
memset
(
dm
,
0
,
sizeof
(
*
dm
));
dm
->
dmSize
=
sizeof
(
*
dm
);
lstrcpyW
(
dm
->
dmDeviceName
,
winepsW
);
}
*
needed
=
sizeof
(
DEVMODEW
);
}
...
...
dlls/winspool.drv/tests/info.c
View file @
dc8d7e7d
...
...
@@ -2989,7 +2989,7 @@ todo_wine
START_TEST
(
info
)
{
hwinspool
=
GetModuleHandleA
(
"winspool.drv"
);
hwinspool
=
LoadLibrary
(
"winspool.drv"
);
pAddPortExA
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"AddPortExA"
);
pEnumPrinterDriversW
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"EnumPrinterDriversW"
);
pGetDefaultPrinterA
=
(
void
*
)
GetProcAddress
(
hwinspool
,
"GetDefaultPrinterA"
);
...
...
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