prntvpt: Implement PTMergeAndValidatePrintTicket.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e934f14ba5
commit
534d2b9864
|
@ -4,7 +4,7 @@
|
||||||
@ stdcall PTCloseProvider(ptr)
|
@ stdcall PTCloseProvider(ptr)
|
||||||
@ stub BindPTProviderThunk
|
@ stub BindPTProviderThunk
|
||||||
@ stub PTGetPrintCapabilities
|
@ stub PTGetPrintCapabilities
|
||||||
@ stub PTMergeAndValidatePrintTicket
|
@ stdcall PTMergeAndValidatePrintTicket(ptr ptr ptr long ptr ptr)
|
||||||
@ stdcall PTConvertPrintTicketToDevMode(ptr ptr long long ptr ptr ptr)
|
@ stdcall PTConvertPrintTicketToDevMode(ptr ptr long long ptr ptr ptr)
|
||||||
@ stdcall PTConvertDevModeToPrintTicket(ptr long ptr long ptr)
|
@ stdcall PTConvertDevModeToPrintTicket(ptr long ptr long ptr)
|
||||||
@ stdcall PTReleaseMemory(ptr)
|
@ stdcall PTReleaseMemory(ptr)
|
||||||
|
|
|
@ -1227,3 +1227,31 @@ HRESULT WINAPI PTConvertDevModeToPrintTicket(HPTPROVIDER provider, ULONG size, P
|
||||||
|
|
||||||
return write_ticket(stream, &ticket, scope);
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -25,7 +25,9 @@ extern "C" {
|
||||||
|
|
||||||
DECLARE_HANDLE(HPTPROVIDER);
|
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
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -45,6 +47,7 @@ HRESULT WINAPI PTOpenProviderEx(const WCHAR *printer, DWORD max_version, DWORD p
|
||||||
HRESULT WINAPI PTCloseProvider(HPTPROVIDER);
|
HRESULT WINAPI PTCloseProvider(HPTPROVIDER);
|
||||||
HRESULT WINAPI PTConvertDevModeToPrintTicket(HPTPROVIDER, ULONG, PDEVMODEW, EPrintTicketScope, IStream *);
|
HRESULT WINAPI PTConvertDevModeToPrintTicket(HPTPROVIDER, ULONG, PDEVMODEW, EPrintTicketScope, IStream *);
|
||||||
HRESULT WINAPI PTConvertPrintTicketToDevMode(HPTPROVIDER, IStream *, EDefaultDevmodeType, EPrintTicketScope, ULONG *, PDEVMODEW *, BSTR *);
|
HRESULT WINAPI PTConvertPrintTicketToDevMode(HPTPROVIDER, IStream *, EDefaultDevmodeType, EPrintTicketScope, ULONG *, PDEVMODEW *, BSTR *);
|
||||||
|
HRESULT WINAPI PTMergeAndValidatePrintTicket(HPTPROVIDER, IStream *, IStream *, EPrintTicketScope, IStream *, BSTR *);
|
||||||
HRESULT WINAPI PTReleaseMemory(PVOID);
|
HRESULT WINAPI PTReleaseMemory(PVOID);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue