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
7508a5d4
Commit
7508a5d4
authored
May 10, 2012
by
André Hentschel
Committed by
Alexandre Julliard
May 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Implement SetPrinterW for level 2.
parent
de9d18c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
info.c
dlls/winspool.drv/info.c
+37
-0
No files found.
dlls/winspool.drv/info.c
View file @
7508a5d4
...
...
@@ -748,6 +748,11 @@ PRINTCAP_LoadPrinters(void) {
return
hadprinter
;
}
static
inline
DWORD
set_reg_DWORD
(
HKEY
hkey
,
LPCSTR
keyname
,
const
DWORD
value
)
{
return
RegSetValueExA
(
hkey
,
keyname
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
value
,
sizeof
(
value
));
}
static
inline
DWORD
set_reg_szW
(
HKEY
hkey
,
const
WCHAR
*
keyname
,
const
WCHAR
*
value
)
{
if
(
value
)
...
...
@@ -2874,6 +2879,30 @@ BOOL WINAPI SetPrinterA( HANDLE printer, DWORD level, LPBYTE data, DWORD command
return
ret
;
}
static
void
set_printer_2
(
HKEY
key
,
const
PRINTER_INFO_2W
*
pi
)
{
set_reg_szW
(
key
,
NameW
,
pi
->
pPrinterName
);
set_reg_szW
(
key
,
Share_NameW
,
pi
->
pShareName
);
set_reg_szW
(
key
,
PortW
,
pi
->
pPortName
);
set_reg_szW
(
key
,
Printer_DriverW
,
pi
->
pDriverName
);
set_reg_szW
(
key
,
DescriptionW
,
pi
->
pComment
);
set_reg_szW
(
key
,
LocationW
,
pi
->
pLocation
);
if
(
pi
->
pDevMode
)
set_reg_devmode
(
key
,
Default_DevModeW
,
pi
->
pDevMode
);
set_reg_szW
(
key
,
Separator_FileW
,
pi
->
pSepFile
);
set_reg_szW
(
key
,
Print_ProcessorW
,
pi
->
pPrintProcessor
);
set_reg_szW
(
key
,
DatatypeW
,
pi
->
pDatatype
);
set_reg_szW
(
key
,
ParametersW
,
pi
->
pParameters
);
set_reg_DWORD
(
key
,
"Attributes"
,
pi
->
Attributes
);
set_reg_DWORD
(
key
,
"Priority"
,
pi
->
Priority
);
set_reg_DWORD
(
key
,
"Default Priority"
,
pi
->
DefaultPriority
);
set_reg_DWORD
(
key
,
"StartTime"
,
pi
->
StartTime
);
set_reg_DWORD
(
key
,
"UntilTime"
,
pi
->
UntilTime
);
}
static
BOOL
set_printer_9
(
HKEY
key
,
const
PRINTER_INFO_9W
*
pi
)
{
if
(
!
pi
->
pDevMode
)
return
FALSE
;
...
...
@@ -2899,6 +2928,14 @@ BOOL WINAPI SetPrinterW( HANDLE printer, DWORD level, LPBYTE data, DWORD command
switch
(
level
)
{
case
2
:
{
PRINTER_INFO_2W
*
pi2
=
(
PRINTER_INFO_2W
*
)
data
;
set_printer_2
(
key
,
pi2
);
ret
=
TRUE
;
break
;
}
case
9
:
{
PRINTER_INFO_9W
*
pi
=
(
PRINTER_INFO_9W
*
)
data
;
...
...
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