Windows Driver Kit: Print Devices
Functions Defined by Print Providers

This topic lists all of the functions a print provider can supply. Most of these functions are described in the Microsoft Windows SDK documentation. If the function is described in the Windows Driver Kit (WDK), the function name provides a link to the associated reference page.

All print providers must supply pointers for all listed functions. However, most vendor-supplied print providers are "partial providers" which do not need to support many of the operations defined by the functions. Therefore, many of the function pointers can be NULL. For more information about partial print providers, see Writing a Network Print Provider.

In the following function lists, functions that must be supported are labeled "Required".

All print providers must export the initialization function, InitializePrintProvidor. Pointers to all the other functions must be supplied in a PRINTPROVIDOR structure. (Note that these two names are misspelled, but are consistent with the names that appear in the header file, Winsplp.h.)

Functions are divided into the following groups:

Initialization Function

FunctionDescription
InitializePrintProvidor (Required)Initializes the print provider and returns pointers to supplied functions.

Print Queue Management Functions

FunctionDescription
AddPrinterAdds a print queue to the list of those managed by the print provider, and associates a print processor with the print queue.
AddPrinterConnectionCreates a connection to the specified print queue.
ClosePrinter (Required)Disables caller access to a specified print queue.
DeletePrinterDeletes a print queue from the list of those managed by the print provider.
DeletePrinterConnectionRemoves a connection to the specified print queue.
EnumPrinters (Required)Enumerates the list of print queues currently managed by the print provider.
FindClosePrinterChangeNotificationDisables printer change notifications that were enabled by FindFirstPrinterChangeNotification.
FindFirstPrinterChangeNotificationReturns a handle to a wait object that the caller can use to wait for specified printer events.
GetPrinter (Required)Returns current parameter values for a specified print queue.
OpenPrinter (Required)Enables caller access to a specified print queue.
RefreshPrinterChangeNotification Called by router if client calls FindNextPrinterChangeNotification (see the Microsoft Windows SDK documentation) with the PRINTER_NOTIFY_OPTIONS_REFRESH flag set.
ResetPrinterModifies a print queue's data type or DEVMODEW structure.
SetPrinter (Required)Sets parameters for a specified print queue.
WaitForPrinterChangeObsolete.

Printer Driver Management Functions

FunctionDescription
AddPrinterDriverAdds a specified printer's driver files to a specified server.
AddPrinterDriverExSame as AddPrinterDriver, with additional parameters.
DeletePrinterDriverDeletes access to a specified printer's driver files, on a specified server.
DeletePrinterDriverExSame as DeletePrinterDriver, with additional parameters.
EnumPrinterDriversReturns a list of printer drivers that have been added to a specified server by calling AddPrinterDriver or AddPrinterDriverEx.
GetPrinterDriverReturns information about a printer driver, which the caller can then pass to AddPrinterDriver. (The returned information is typically obtained from an INF file.)
GetPrinterDriverExSame as GetPrinterDriver, with additional parameters.
GetPrinterDriverDirectoryReturns the name of the server's printer driver directory.

Print Job Creation Functions

FunctionDescription
AbortPrinter
(Required)
Attempts to delete the current job from the specified print queue.
AddJob
(Required)
Returns a job identifier and spool file path. The caller uses CreateFile and WriteFile to send data to the spool file.
EndDocPrinter
(Required)
Performs job completion operations.
EndPagePrinterPerforms page completion operations.
ReadPrinterObtains status information from a bidirectional printer.
ScheduleJob
(Required)
Informs the provider that a specified job can be scheduled. The job is specified by a job identifier previously returned by AddJob.
StartDocPrinter
(Required)
Prepares the print provider to begin spooling a print job.
StartPagePrinterPrepares the print provider to receive a print job page.
WritePrinter
(Required)
Receives a portion of the print job's data stream.

Note  The AddJob...ScheduleJob sequence is an alternative to the StartDocPrinter...EndDocPrinter sequence.

Print Job Scheduling Functions

FunctionDescription
EnumJobs
(Required)
Returns a list of scheduled print jobs.
GetJob
(Required)
Returns job parameters.
SetJob
(Required)
Cancels, pauses, resumes, or restarts a print job, or sets job parameters.

Forms Management Functions

FunctionDescription
AddFormAdds a specified form to the list of those available for a specified printer.
DeleteFormRemoves a specified form from the list of those available for a specified printer.
EnumFormsReturns a list of forms available for a specified printer.
GetFormReturns characteristics of a specified form.
SetFormModifies characteristics of a specified form.

Print Processor Management Functions

FunctionDescription
AddPrintProcessor
Installs a print processor on the specified server and adds it to the list of those that the print provider can call.
DeletePrintProcessor
Deletes a print processor from the list of those that the print provider can call.
EnumPrintProcessorDataTypes
Returns a list of the data types supported by the print processors that are callable by the print provider.
EnumPrintProcessors
Returns the list of print processors that the print provider can call.
GetPrintProcessorDirectory
Returns the directory path in which print processor files must be stored.

Print Monitor Management Functions

FunctionDescription
AddMonitorAdds a print monitor to the list of those that the print provider can call.
DeleteMonitorDeletes a print monitor from the list of those that the print provider can call.
EnumMonitorsReturns the list of print monitors that the print provider can call.

Port Management Functions

FunctionDescription
AddPortAdds a printer port to the list of those available, typically by calling the specified port monitor's AddPortUI function.
AddPortExSame as AddPort, with additional parameters.
ConfigurePort
(Required)
Configures a printer port, typically by calling the specified port monitor's ConfigurePortUI function.
DeletePort
(Required)
Deletes a printer port from the list of those available, typically by calling the specified port monitor's DeletePortUI function.
EnumPorts
(Required)
Returns a list of available printer ports.
SetPortSets parameters for a specified printer port.

Registry Management Functions

FunctionDescription
DeletePrinterDataDeletes the value currently assigned to a specified value name, under the specified printer's PrinterDriverData key.
DeletePrinterDataExSame as DeletePrinterData, with additional parameters.
DeletePrinterKeyDeletes a specified key and its subkeys, if they are currently stored in the registry under the specified printer's PrinterDriverData key.
EnumPrinterDataReturns each of the value names and currently assigned values that are stored in the registry under the specified printer's PrinterDriverData key.
EnumPrinterDataExSame as EnumPrinterData, with additional parameters.
EnumPrinterKeyReturns a list of subkeys currently contained in the registry under a specified key name.
GetPrinterDataReturns the value currently assigned to a specified value name, which is stored in the registry under the specified printer's PrinterDriverData key.
GetPrinterDataExSame as GetPrinterData, with additional parameters.
SetPrinterDataStores a specified value name and value in the registry, under the specified printer's PrinterDriverData key.
SetPrinterDataExSame as SetPrinterData, with additional parameters.

Other Functions

FunctionDescription
XcvData Provides a communication path between a port monitor UI DLL and a port monitor server DLL.


Send feedback on this topic
Built on November 19, 2009
Page view tracker