PTCloseProvider function

Closes a print ticket provider handle.

Syntax


HRESULT PTCloseProvider(
  _In_  HPTPROVIDER hProvider
);

Parameters

hProvider [in]

A handle to the provider. This handle is returned by the PTOpenProvider or PTOpenProviderEx function.

Return value

If the operation succeeds, the return value is S_OK, otherwise the HRESULT contains an error code.

If hProvider was opened in a different thread, the HRESULT is E_INVALIDARG.

For more information about COM error codes, see Error Handling.

Remarks

Note  This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation—factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.

The hProvider parameter must be a handle that was opened in the same thread as the thread in which it is used for this function.

A handle cannot be used after it is closed.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Prntvpt.h

Library

Prntvpt.lib

DLL

Prntvpt.dll

See also

Print Schema
Printing
Print Spooler API Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft