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
ae91e974
Commit
ae91e974
authored
Feb 26, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Implement Level 6 + 7 for GetPrinter.
parent
841ba7de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
1 deletion
+75
-1
info.c
dlls/winspool.drv/info.c
+75
-1
No files found.
dlls/winspool.drv/info.c
View file @
ae91e974
...
...
@@ -6,7 +6,7 @@
* Copyright 1999 Klaas van Gend
* Copyright 1999, 2000 Huw D M Davies
* Copyright 2001 Marcus Meissner
* Copyright 2005
, 2006, 2007
Detlef Riekenberg
* Copyright 2005
-2008
Detlef Riekenberg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -216,6 +216,7 @@ static const WCHAR ManufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e
static
const
WCHAR
MonitorW
[]
=
{
'M'
,
'o'
,
'n'
,
'i'
,
't'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
MonitorUIW
[]
=
{
'M'
,
'o'
,
'n'
,
'i'
,
't'
,
'o'
,
'r'
,
'U'
,
'I'
,
0
};
static
const
WCHAR
NameW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
ObjectGUIDW
[]
=
{
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'G'
,
'U'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
OEM_UrlW
[]
=
{
'O'
,
'E'
,
'M'
,
' '
,
'U'
,
'r'
,
'l'
,
0
};
static
const
WCHAR
ParametersW
[]
=
{
'P'
,
'a'
,
'r'
,
'a'
,
'm'
,
'e'
,
't'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
PortW
[]
=
{
'P'
,
'o'
,
'r'
,
't'
,
0
};
...
...
@@ -3996,6 +3997,41 @@ static BOOL WINSPOOL_GetPrinter_5(HKEY hkeyPrinter, PRINTER_INFO_5W *pi5,
return
space
;
}
/*********************************************************************
* WINSPOOL_GetPrinter_7
*
* Fills out a PRINTER_INFO_7 struct storing the strings in buf.
*/
static
BOOL
WINSPOOL_GetPrinter_7
(
HKEY
hkeyPrinter
,
PRINTER_INFO_7W
*
pi7
,
LPBYTE
buf
,
DWORD
cbBuf
,
LPDWORD
pcbNeeded
,
BOOL
unicode
)
{
DWORD
size
,
left
=
cbBuf
;
BOOL
space
=
(
cbBuf
>
0
);
LPBYTE
ptr
=
buf
;
*
pcbNeeded
=
0
;
if
(
WINSPOOL_GetStringFromReg
(
hkeyPrinter
,
ObjectGUIDW
,
ptr
,
left
,
&
size
,
unicode
))
{
if
(
space
&&
size
<=
left
)
{
pi7
->
pszObjectGUID
=
(
LPWSTR
)
ptr
;
ptr
+=
size
;
left
-=
size
;
}
else
space
=
FALSE
;
*
pcbNeeded
+=
size
;
}
if
(
pi7
)
{
/* We do not have a Directory Service */
pi7
->
dwAction
=
DSPRINT_UNPUBLISH
;
}
if
(
!
space
&&
pi7
)
/* zero out pi7 if we can't completely fill buf */
memset
(
pi7
,
0
,
sizeof
(
*
pi7
));
return
space
;
}
/*****************************************************************************
* WINSPOOL_GetPrinter
*
...
...
@@ -4092,6 +4128,44 @@ static BOOL WINSPOOL_GetPrinter(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
break
;
}
case
6
:
{
PRINTER_INFO_6
*
pi6
=
(
PRINTER_INFO_6
*
)
pPrinter
;
size
=
sizeof
(
PRINTER_INFO_6
);
if
(
size
<=
cbBuf
)
{
/* FIXME: We do not update the status yet */
pi6
->
dwStatus
=
WINSPOOL_GetDWORDFromReg
(
hkeyPrinter
,
"Status"
);
ret
=
TRUE
;
}
else
{
ret
=
FALSE
;
}
needed
+=
size
;
break
;
}
case
7
:
{
PRINTER_INFO_7W
*
pi7
=
(
PRINTER_INFO_7W
*
)
pPrinter
;
size
=
sizeof
(
PRINTER_INFO_7W
);
if
(
size
<=
cbBuf
)
{
ptr
=
pPrinter
+
size
;
cbBuf
-=
size
;
memset
(
pPrinter
,
0
,
size
);
}
else
{
pi7
=
NULL
;
cbBuf
=
0
;
}
ret
=
WINSPOOL_GetPrinter_7
(
hkeyPrinter
,
pi7
,
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