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
ce51d9d0
Commit
ce51d9d0
authored
Jun 15, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Support the spooler in GetPrinterData.
parent
ec25a446
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
26 deletions
+53
-26
info.c
dlls/winspool.drv/info.c
+52
-26
wine.inf.in
tools/wine.inf.in
+1
-0
No files found.
dlls/winspool.drv/info.c
View file @
ce51d9d0
...
...
@@ -5354,27 +5354,40 @@ DWORD WINAPI GetPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName,
LPCSTR
pValueName
,
LPDWORD
pType
,
LPBYTE
pData
,
DWORD
nSize
,
LPDWORD
pcbNeeded
)
{
HKEY
hkeyPrinter
,
hkeySubkey
;
opened_printer_t
*
printer
;
HKEY
hkeyPrinters
,
hkeyPrinter
=
0
,
hkeySubkey
=
0
;
DWORD
ret
;
TRACE
(
"(%p, %s, %s %p, %p, %08x, %p)
\n
"
,
hPrinter
,
debugstr_a
(
pKeyName
),
debugstr_a
(
pValueName
),
pType
,
pData
,
nSize
,
pcbNeeded
);
TRACE
(
"(%p, %s, %s, %p, %p, %u, %p)
\n
"
,
hPrinter
,
debugstr_a
(
pKeyName
),
debugstr_a
(
pValueName
),
pType
,
pData
,
nSize
,
pcbNeeded
);
if
((
ret
=
WINSPOOL_GetOpenedPrinterRegKey
(
hPrinter
,
&
hkeyPrinter
))
!=
ERROR_SUCCESS
)
return
ret
;
printer
=
get_opened_printer
(
hPrinter
);
if
(
!
printer
)
return
ERROR_INVALID_HANDLE
;
if
((
ret
=
RegOpenKeyA
(
hkeyPrinter
,
pKeyName
,
&
hkeySubkey
))
!=
ERROR_SUCCESS
)
{
WARN
(
"Can't open subkey %s
\n
"
,
debugstr_a
(
pKeyName
));
RegCloseKey
(
hkeyPrinter
);
return
ret
;
ret
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
PrintersW
,
&
hkeyPrinters
);
if
(
ret
)
return
ret
;
if
(
printer
->
name
)
{
ret
=
RegOpenKeyW
(
hkeyPrinters
,
printer
->
name
,
&
hkeyPrinter
);
if
(
ret
)
{
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
if
((
ret
=
RegOpenKeyA
(
hkeyPrinter
,
pKeyName
,
&
hkeySubkey
))
!=
ERROR_SUCCESS
)
{
WARN
(
"Can't open subkey %s: %d
\n
"
,
debugstr_a
(
pKeyName
),
ret
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
}
*
pcbNeeded
=
nSize
;
ret
=
RegQueryValueExA
(
hkeySubkey
,
pValueName
,
0
,
pType
,
pData
,
pcbNeeded
);
ret
=
RegQueryValueExA
(
printer
->
name
?
hkeySubkey
:
hkeyPrinters
,
pValueName
,
0
,
pType
,
pData
,
pcbNeeded
);
RegCloseKey
(
hkeySubkey
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
...
...
@@ -5385,27 +5398,40 @@ DWORD WINAPI GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName,
LPCWSTR
pValueName
,
LPDWORD
pType
,
LPBYTE
pData
,
DWORD
nSize
,
LPDWORD
pcbNeeded
)
{
HKEY
hkeyPrinter
,
hkeySubkey
;
opened_printer_t
*
printer
;
HKEY
hkeyPrinters
,
hkeyPrinter
=
0
,
hkeySubkey
=
0
;
DWORD
ret
;
TRACE
(
"(%p, %s, %s %p, %p, %08x, %p)
\n
"
,
hPrinter
,
debugstr_w
(
pKeyName
),
debugstr_w
(
pValueName
),
pType
,
pData
,
nSize
,
pcbNeeded
);
TRACE
(
"(%p, %s, %s, %p, %p, %u, %p)
\n
"
,
hPrinter
,
debugstr_w
(
pKeyName
),
debugstr_w
(
pValueName
),
pType
,
pData
,
nSize
,
pcbNeeded
);
if
((
ret
=
WINSPOOL_GetOpenedPrinterRegKey
(
hPrinter
,
&
hkeyPrinter
))
!=
ERROR_SUCCESS
)
return
ret
;
printer
=
get_opened_printer
(
hPrinter
);
if
(
!
printer
)
return
ERROR_INVALID_HANDLE
;
if
((
ret
=
RegOpenKeyW
(
hkeyPrinter
,
pKeyName
,
&
hkeySubkey
))
!=
ERROR_SUCCESS
)
{
WARN
(
"Can't open subkey %s
\n
"
,
debugstr_w
(
pKeyName
));
RegCloseKey
(
hkeyPrinter
);
return
ret
;
ret
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
PrintersW
,
&
hkeyPrinters
);
if
(
ret
)
return
ret
;
if
(
printer
->
name
)
{
ret
=
RegOpenKeyW
(
hkeyPrinters
,
printer
->
name
,
&
hkeyPrinter
);
if
(
ret
)
{
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
if
((
ret
=
RegOpenKeyW
(
hkeyPrinter
,
pKeyName
,
&
hkeySubkey
))
!=
ERROR_SUCCESS
)
{
WARN
(
"Can't open subkey %s: %d
\n
"
,
debugstr_w
(
pKeyName
),
ret
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
}
*
pcbNeeded
=
nSize
;
ret
=
RegQueryValueExW
(
hkeySubkey
,
pValueName
,
0
,
pType
,
pData
,
pcbNeeded
);
ret
=
RegQueryValueExW
(
printer
->
name
?
hkeySubkey
:
hkeyPrinters
,
pValueName
,
0
,
pType
,
pData
,
pcbNeeded
);
RegCloseKey
(
hkeySubkey
);
RegCloseKey
(
hkeyPrinter
);
RegCloseKey
(
hkeyPrinters
);
return
ret
;
}
...
...
tools/wine.inf.in
View file @
ce51d9d0
...
...
@@ -1009,6 +1009,7 @@ HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N"
[Printing]
HKLM,%Control%\Print\Monitors\Local Port,"Driver",2,"localspl.dll"
HKLM,%Control%\Print\Printers,"DefaultSpoolDirectory",2,"%11%\spool\printers"
HKLM,%CurrentVersionNT%\Ports,"FILE:",,""
HKLM,%CurrentVersionNT%\Ports,"LPT1:",,""
HKLM,%CurrentVersionNT%\Ports,"LPT2:",,""
...
...
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