GetPrintCapabilitiesThunk2 function
[This function is not supported and might be disabled or deleted in future versions of Windows. PTGetPrintCapabilities provides equivalent functionality and should be used instead.]
Applies to: desktop apps only
Retrieves the printer's capabilities formatted in compliance with the XML Print Schema.
Syntax
HRESULT GetPrintCapabilitiesThunk2( __in HPTPROVIDER hProvider, __in BYTE *pPrintTicket, __in INT cbPrintTicket, __out BYTE **ppbPrintCapabilities, __out INT *pcbPrintCapabilitiesLength, __out_opt BSTR *pbstrErrorMessage );
Parameters
- hProvider [in]
-
A handle to an open print ticket provider. This handle is returned by the BindPTProviderThunk function.
- pPrintTicket [in]
-
The buffer that contains the print ticket data, expressed in XML as described in the Print Schema.
- cbPrintTicket [in]
-
The size, in bytes, of the buffer referenced by pPrintTicket.
- ppbPrintCapabilities [out]
-
The address of the buffer that is allocated by this function and contains the valid print capabilities information, encoded as XML. This function calls CoTaskMemAlloc to allocate this buffer. When the buffer is no longer needed, the caller must free it by calling CoTaskMemFree.
- pcbPrintCapabilitiesLength [out]
-
The size, in bytes, of the buffer referenced by ppbPrintCapabilities.
- pbstrErrorMessage [out, optional]
-
A pointer to a string that specifies what, if anything, is invalid about pPrintTicket. If it is valid, this value is NULL. If pbstrErrorMessage is not NULL when the function returns, the caller must free the string with SysFreeString.
Return value
If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code. For more information about COM error codes, see Error Handling.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012