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
534d2b98
Commit
534d2b98
authored
Jun 17, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prntvpt: Implement PTMergeAndValidatePrintTicket.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e934f14b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
2 deletions
+33
-2
prntvpt.spec
dlls/prntvpt/prntvpt.spec
+1
-1
ticket.c
dlls/prntvpt/ticket.c
+28
-0
prntvpt.h
include/prntvpt.h
+4
-1
No files found.
dlls/prntvpt/prntvpt.spec
View file @
534d2b98
...
...
@@ -4,7 +4,7 @@
@ stdcall PTCloseProvider(ptr)
@ stub BindPTProviderThunk
@ stub PTGetPrintCapabilities
@ st
ub PTMergeAndValidatePrintTicket
@ st
dcall PTMergeAndValidatePrintTicket(ptr ptr ptr long ptr ptr)
@ stdcall PTConvertPrintTicketToDevMode(ptr ptr long long ptr ptr ptr)
@ stdcall PTConvertDevModeToPrintTicket(ptr long ptr long ptr)
@ stdcall PTReleaseMemory(ptr)
...
...
dlls/prntvpt/ticket.c
View file @
534d2b98
...
...
@@ -1227,3 +1227,31 @@ HRESULT WINAPI PTConvertDevModeToPrintTicket(HPTPROVIDER provider, ULONG size, P
return
write_ticket
(
stream
,
&
ticket
,
scope
);
}
HRESULT
WINAPI
PTMergeAndValidatePrintTicket
(
HPTPROVIDER
provider
,
IStream
*
base
,
IStream
*
delta
,
EPrintTicketScope
scope
,
IStream
*
result
,
BSTR
*
error
)
{
struct
prn_provider
*
prov
=
(
struct
prn_provider
*
)
provider
;
struct
ticket
ticket
;
HRESULT
hr
;
TRACE
(
"%p,%p,%p,%d,%p,%p
\n
"
,
provider
,
base
,
delta
,
scope
,
result
,
error
);
if
(
!
is_valid_provider
(
provider
)
||
!
base
||
!
result
)
return
E_INVALIDARG
;
hr
=
initialize_ticket
(
prov
,
&
ticket
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
parse_ticket
(
base
,
scope
,
&
ticket
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
delta
)
{
hr
=
parse_ticket
(
delta
,
scope
,
&
ticket
);
if
(
hr
!=
S_OK
)
return
hr
;
}
hr
=
write_ticket
(
result
,
&
ticket
,
scope
);
return
hr
?
hr
:
S_PT_NO_CONFLICT
;
}
include/prntvpt.h
View file @
534d2b98
...
...
@@ -25,7 +25,9 @@ extern "C" {
DECLARE_HANDLE
(
HPTPROVIDER
);
#define E_PRINTTICKET_FORMAT 0x80040003
#define S_PT_NO_CONFLICT 0x00040001
#define S_PT_CONFLICT_RESOLVED 0x00040002
#define E_PRINTTICKET_FORMAT 0x80040003
typedef
enum
{
...
...
@@ -45,6 +47,7 @@ HRESULT WINAPI PTOpenProviderEx(const WCHAR *printer, DWORD max_version, DWORD p
HRESULT
WINAPI
PTCloseProvider
(
HPTPROVIDER
);
HRESULT
WINAPI
PTConvertDevModeToPrintTicket
(
HPTPROVIDER
,
ULONG
,
PDEVMODEW
,
EPrintTicketScope
,
IStream
*
);
HRESULT
WINAPI
PTConvertPrintTicketToDevMode
(
HPTPROVIDER
,
IStream
*
,
EDefaultDevmodeType
,
EPrintTicketScope
,
ULONG
*
,
PDEVMODEW
*
,
BSTR
*
);
HRESULT
WINAPI
PTMergeAndValidatePrintTicket
(
HPTPROVIDER
,
IStream
*
,
IStream
*
,
EPrintTicketScope
,
IStream
*
,
BSTR
*
);
HRESULT
WINAPI
PTReleaseMemory
(
PVOID
);
#ifdef __cplusplus
...
...
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