Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.14 KB

querydevicenamespace.md

File metadata and controls

30 lines (23 loc) · 1.14 KB
title description keywords ms.date
QueryDeviceNamespace
The IPrintTicketProvider QueryDeviceNamespace routine provides the default namespace that the PrintTicket-to-DEVMODE and DEVMODE-to-PrintTicket conversions will use if they need to put a feature or option from a private namespace in a Print Ticket.
QueryDeviceNamespace
01/30/2023

QueryDeviceNamespace

[!includePrint Support Apps]

The IPrintTicketProvider::QueryDeviceNamespace routine provides the default namespace that the PrintTicket-to-DEVMODE and DEVMODE-to-PrintTicket conversions will use if they need to put a feature or option from a private namespace in a Print Ticket.

The following sample code illustrates how this method could be implemented.

STDMETHODIMP
CPrintTicketProvider::QueryDeviceNamespace(BSTR *pDefaultNamespace)
{
    *pDefaultNamespace = SysAllocString(TEXT("https://schemas.contoso.com/printers/seriesA/v.1.0"));
    
    if (!(*pDefaultNamespace))
    {
        return E_OUTOFMEMORY;
    }
 
    return S_OK;
}