Commit f8d3b8e5 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

prntvpt: Implement PTCloseProvider.

parent 83eb1e15
......@@ -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;
......
@ 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment