prntvpt: Implement PTCloseProvider.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
83eb1e1535
commit
f8d3b8e58f
|
@ -57,6 +57,27 @@ HRESULT WINAPI PTQuerySchemaVersionSupport(PCWSTR printer, DWORD *version)
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static BOOL is_valid_provider(struct prn_provider *prov)
|
||||
{
|
||||
return prov && prov->owner == GetCurrentThreadId();
|
||||
}
|
||||
|
||||
HRESULT WINAPI PTCloseProvider(HPTPROVIDER provider)
|
||||
{
|
||||
struct prn_provider *prov = (struct prn_provider *)provider;
|
||||
|
||||
TRACE("%p\n", provider);
|
||||
|
||||
if (!is_valid_provider(prov))
|
||||
return E_HANDLE;
|
||||
|
||||
prov->owner = 0;
|
||||
ClosePrinter(prov->hprn);
|
||||
heap_free(prov);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI PTOpenProvider(PCWSTR printer, DWORD version, HPTPROVIDER *provider)
|
||||
{
|
||||
DWORD used_version;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@ stdcall PTQuerySchemaVersionSupport(wstr ptr)
|
||||
@ stdcall PTOpenProvider(wstr long ptr)
|
||||
@ stdcall PTOpenProviderEx(wstr long long ptr ptr)
|
||||
@ stub PTCloseProvider
|
||||
@ stdcall PTCloseProvider(ptr)
|
||||
@ stub BindPTProviderThunk
|
||||
@ stub PTGetPrintCapabilities
|
||||
@ stub PTMergeAndValidatePrintTicket
|
||||
|
|
Loading…
Reference in New Issue