What's New for Printing in Windows Vista

Lists the printing application programming interfaces (APIs) introduced in Windows Vista.

The following functions and enumerations are used to manage print tickets.

Function Description Header Library
PTConvertPrintTicketToDevMode Converts a print ticket to a DEVMODE structure. Prntvpt.h Prntvpt.lib
PTConvertDevModeToPrintTicket Converts a DEVMODE to a print ticket. Prntvpt.h Prntvpt.lib
PTReleaseMemory Releases buffers created by certain print ticket management functions. Prntvpt.h Prntvpt.lib
PTMergeAndValidatePrintTicket Validates and merges two print tickets into a viable print ticket. Prntvpt.h Prntvpt.lib
PTGetPrintCapabilities Gets an account of the printer's capabilities. Prntvpt.h Prntvpt.lib
PTOpenProvider Opens a print ticket provider. Prntvpt.h Prntvpt.lib
PTOpenProviderEx Opens a print ticket provider, even if it does not support the preferred version of the Print Schema. Prntvpt.h Prntvpt.lib
PTCloseProvider Closes a print ticket provider. Prntvpt.h Prntvpt.lib
PTQuerySchemaVersionSupport Gets the latest version of the Print Schema that a specified printer supports. Prntvpt.h Prntvpt.lib

 

Enumeration Description Header
EDefaultDevmodeType Enables callers to specify which DEVMODE is used as the source of default values when a print ticket does not specify all the settings that might be in a DEVMODE. Prntvpt.h
EPrintTicketScope Specifies the scope of a print ticket. Prntvpt.h

 

The following functions are used to install printer drivers.

Function Description Header Library
CorePrinterDriverInstalled Reports whether a core printer driver with a specified GUID, date, and version is installed. Winspool.h Winspool.lib
DeletePrinterDriverPackage Deletes a printer driver package from the driver store. Winspool.h Winspool.lib
GetCorePrinterDrivers Gets the GUID, version, and date of the specified core printer drivers and the path to their packages. Winspool.h Winspool.lib
GetPrinterDriverPackagePath Gets the path to the specified printer driver package on a print server. Winspool.h Winspool.lib
InstallPrinterDriverFromPackage Installs a printer driver from a driver package in the print server's driver store. Winspool.h Winspool.lib
UploadPrinterDriverPackage Uploads a printer driver to the driver store of a print server so that it can be installed with InstallPrinterDriverFromPackage. Winspool.h Winspool.lib

 

The following functions, enumerations, and structures are used for printing and to manage printers and printer connections.

Function Description Header Library
AddPrinterConnection2 Adds a connection to the specified printer for the current user. Winspool.h Winspool.lib
OpenPrinter2 Retrieves a handle to the specified printer or print server or other types of handles in the print subsystem, while setting some of the printer options. Winspool.h Winspool.lib

 

Enumeration Description Header
PRINTER_OPTION_FLAGS Specifies the caching of a handle for a printer opened with OpenPrinter2. Winspool.h

 

Structure Description Header
CORE_PRINTER_DRIVER Represents a printer driver on which other printer drivers are dependent. Winspool.h
DRIVER_INFO_8 Represents a printer driver. Winspool.h
FORM_INFO_2 Represents information about a localizable print form. Winspool.h
JOB_INFO_4 Represents a full set of values associated with a job and supports 64 bit spool files. Winspool.h
PRINTER_CONNECTION_INFO_1 Represents information about a connection to a printer. Winspool.h
PRINTER_OPTIONS Represents printer options. Winspool.h
PRINTPROCESSOR_CAPS_2 Represents printer capability information. Winspool.h

 

The following functions, enumerations, and interfaces are used to implement a new asynchronous printing notification system.

Function Description Header Library
CreatePrintAsyncNotifyChannel Creates a communication channel between the spooler-hosted printing component, such as a print driver or port monitor, and an application that needs to receive notifications from the component. Prnasnot.h Winspool.lib
RegisterForPrintAsyncNotifications Registers an application to receive notifications from spooler-hosted components such as printer drivers, print processors, and port monitors. Prnasnot.h Winspool.lib
UnRegisterForPrintAsyncNotifications Enables an application that has registered to receive notifications from spooler-hosted printing components to end its subscription to the notifications. Prnasnot.h Winspool.lib

 

Enumeration Description Header
PrintAsyncNotifyConversationStyle Specifies whether communication between applications and Print Spooler-hosted components, such as printer drivers, print processors, and port monitors, is bidirectional or unidirectional. Prnasnot.h
PrintAsyncNotifyError Specifies an error in an asynchronous notification transaction. Prnasnot.h
PrintAsyncNotifyUserFilter Specifies whether notifications will go only to listening applications that are associated with the same user as the Print Spooler-hosted sender or whether they will go to a broader set of listening applications. Prnasnot.h

 

Interface and method Description Header Library
IPrintAsyncNotifyCallback::ChannelClosed Used by one member of a communication channel to advise the other member that the channel is being closed. Prnasnot.h Winspool.lib
IPrintAsyncNotifyCallback::OnEventNotify Called by the Print Spooler to alert a listener that a notification is available on a specified channel. Prnasnot.h Winspool.lib
IPrintAsyncNotifyChannel::CloseChannel Closes a communication channel. Prnasnot.h Winspool.lib
IPrintAsyncNotifyChannel::SendNotification Sends a notification from a Print Spooler-hosted component to one or more listening applications or sends a response from an application back to a component. Prnasnot.h Winspool.lib
IPrintAsyncNotifyDataObject::AcquireData Points listening applications to the notification data as well as the data's size and type. Prnasnot.h Winspool.lib
IPrintAsyncNotifyDataObject::ReleaseData Releases the memory used by the data encapsulated in the IPrintAsyncNotifyDataObject. Prnasnot.h Winspool.lib

 

The following enumeration and structures are used for invoking the Microsoft XPS Document Converter (MXDC) which writes XML Paper Specification (XPS) documents to a device or file.

Enumeration Description Header
MxdcS0PageEnums Specifies types of resources, such as fonts or images, on an XPS page. Mxdc.h

 

Structure Description Header
MxdcEscapeHeader Represents an instruction to the MXDC. Mxdc.h
MxdcGetFileNameData Represents the full path and name for an MXDC output file. Mxdc.h
MxdcPrintTicketEscape Represents a combination of MxdcEscapeHeader and MxdcPrintTicketPassthrough. Mxdc.h
MxdcPrintTicketPassthrough Represents a print ticket that will be associated with an XPS document. Mxdc.h
MxdcS0PageData Represents an XPS-formatted page to be passed to the MXDC output file without any processing. Mxdc.h
MxdcS0PagePassthroughEscape Represents a combination of MxdcEscapeHeader and MxdcS0PageData. Mxdc.h
MxdcS0PageResourceEscape Represents a combination of MxdcEscapeHeader and MxdcS0PageResource. Mxdc.h
MxdcS0PageResource Represents a resource, such as a font or image, that is included on an XPS page by the MXDC. Mxdc.h