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
81dadcb1
Commit
81dadcb1
authored
Feb 28, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Implement Level 9 for GetPrinter.
parent
c9b588b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
info.c
dlls/winspool.drv/info.c
+57
-0
No files found.
dlls/winspool.drv/info.c
View file @
81dadcb1
...
...
@@ -4032,6 +4032,43 @@ static BOOL WINSPOOL_GetPrinter_7(HKEY hkeyPrinter, PRINTER_INFO_7W *pi7, LPBYTE
return
space
;
}
/*********************************************************************
* WINSPOOL_GetPrinter_9
*
* Fills out a PRINTER_INFO_9A|W struct storing the strings in buf.
* The strings are either stored as unicode or ascii.
*/
static
BOOL
WINSPOOL_GetPrinter_9
(
HKEY
hkeyPrinter
,
PRINTER_INFO_9W
*
pi9
,
LPBYTE
buf
,
DWORD
cbBuf
,
LPDWORD
pcbNeeded
,
BOOL
unicode
)
{
DWORD
size
;
BOOL
space
=
(
cbBuf
>
0
);
*
pcbNeeded
=
0
;
if
(
WINSPOOL_GetDevModeFromReg
(
hkeyPrinter
,
Default_DevModeW
,
buf
,
cbBuf
,
&
size
,
unicode
))
{
if
(
space
&&
size
<=
cbBuf
)
{
pi9
->
pDevMode
=
(
LPDEVMODEW
)
buf
;
}
else
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
else
{
WINSPOOL_GetDefaultDevMode
(
buf
,
cbBuf
,
&
size
,
unicode
);
if
(
space
&&
size
<=
cbBuf
)
{
pi9
->
pDevMode
=
(
LPDEVMODEW
)
buf
;
}
else
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
if
(
!
space
&&
pi9
)
/* zero out pi9 if we can't completely fill buf */
memset
(
pi9
,
0
,
sizeof
(
*
pi9
));
return
space
;
}
/*****************************************************************************
* WINSPOOL_GetPrinter
*
...
...
@@ -4166,6 +4203,26 @@ static BOOL WINSPOOL_GetPrinter(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
}
case
9
:
{
PRINTER_INFO_9W
*
pi9
=
(
PRINTER_INFO_9W
*
)
pPrinter
;
size
=
sizeof
(
PRINTER_INFO_9W
);
if
(
size
<=
cbBuf
)
{
ptr
=
pPrinter
+
size
;
cbBuf
-=
size
;
memset
(
pPrinter
,
0
,
size
);
}
else
{
pi9
=
NULL
;
cbBuf
=
0
;
}
ret
=
WINSPOOL_GetPrinter_9
(
hkeyPrinter
,
pi9
,
ptr
,
cbBuf
,
&
needed
,
unicode
);
needed
+=
size
;
break
;
}
default:
FIXME
(
"Unimplemented level %d
\n
"
,
Level
);
SetLastError
(
ERROR_INVALID_LEVEL
);
...
...
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