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
29d05e54
Commit
29d05e54
authored
Oct 25, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Add AddPrintProcessor implementation.
parent
efe693e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
6 deletions
+64
-6
provider.c
dlls/localspl/provider.c
+52
-1
info.c
dlls/winspool.drv/info.c
+12
-5
No files found.
dlls/localspl/provider.c
View file @
29d05e54
...
...
@@ -2627,6 +2627,57 @@ emP_cleanup:
return
(
res
);
}
static
BOOL
WINAPI
fpAddPrintProcessor
(
WCHAR
*
name
,
WCHAR
*
environment
,
WCHAR
*
path
,
WCHAR
*
print_proc
)
{
const
printenv_t
*
env
;
HKEY
hroot
=
NULL
;
WCHAR
*
regpath
;
LSTATUS
s
;
TRACE
(
"(%s, %s, %s, %s)
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
environment
),
debugstr_w
(
path
),
debugstr_w
(
print_proc
));
if
(
!
path
||
!
print_proc
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
name
&&
name
[
0
])
{
FIXME
(
"server %s not supported
\n
"
,
debugstr_w
(
name
));
SetLastError
(
ERROR_INVALID_NAME
);
return
FALSE
;
}
env
=
validate_envW
(
environment
);
if
(
!
env
)
return
FALSE
;
regpath
=
malloc
(
sizeof
(
fmt_printprocessorsW
)
+
wcslen
(
env
->
envname
)
*
sizeof
(
WCHAR
));
if
(
!
regpath
)
return
FALSE
;
wsprintfW
(
regpath
,
fmt_printprocessorsW
,
env
->
envname
);
s
=
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
regpath
,
&
hroot
);
free
(
regpath
);
if
(
!
s
)
{
s
=
RegSetKeyValueW
(
hroot
,
print_proc
,
L"Driver"
,
REG_SZ
,
path
,
(
wcslen
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
}
RegCloseKey
(
hroot
);
if
(
s
)
{
SetLastError
(
s
);
return
FALSE
;
}
return
TRUE
;
}
/*****************************************************************************
* fpEnumPrintProcessors [exported through PRINTPROVIDOR]
*
...
...
@@ -3715,7 +3766,7 @@ static const PRINTPROVIDOR backend = {
NULL
,
/* fpGetPrinterDriver */
fpGetPrinterDriverDirectory
,
NULL
,
/* fpDeletePrinterDriver */
NULL
,
/* fpAddPrintProcessor */
fpAddPrintProcessor
,
fpEnumPrintProcessors
,
fpGetPrintProcessorDirectory
,
NULL
,
/* fpDeletePrintProcessor */
...
...
dlls/winspool.drv/info.c
View file @
29d05e54
...
...
@@ -4799,12 +4799,19 @@ BOOL WINAPI AddPrintProcessorA(LPSTR pName, LPSTR pEnvironment, LPSTR pPathName,
/*****************************************************************************
* AddPrintProcessorW [WINSPOOL.@]
*/
BOOL
WINAPI
AddPrintProcessorW
(
LPWSTR
pName
,
LPWSTR
pEnvironment
,
LPWSTR
pPathName
,
LPWSTR
pPrintProcessorName
)
BOOL
WINAPI
AddPrintProcessorW
(
WCHAR
*
name
,
WCHAR
*
env
,
WCHAR
*
path
,
WCHAR
*
print_proc
)
{
FIXME
(
"(%s,%s,%s,%s): stub
\n
"
,
debugstr_w
(
pName
),
debugstr_w
(
pEnvironment
),
debugstr_w
(
pPathName
),
debugstr_w
(
pPrintProcessorName
));
return
TRUE
;
TRACE
(
"(%s,%s,%s,%s)
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
env
),
debugstr_w
(
path
),
debugstr_w
(
print_proc
));
if
(
!
path
||
!
print_proc
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
((
backend
==
NULL
)
&&
!
load_backend
())
return
FALSE
;
return
backend
->
fpAddPrintProcessor
(
name
,
env
,
path
,
print_proc
);
}
/*****************************************************************************
...
...
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