Windows Dev Center

AddPrintProcessor function

The AddPrintProcessor function installs a print processor on the specified server and adds the print-processor name to the list of supported print processors.

Syntax


BOOL AddPrintProcessor(
  _In_ LPTSTR pName,
  _In_ LPTSTR pEnvironment,
  _In_ LPTSTR pPathName,
  _In_ LPTSTR pPrintProcessorName
);

Parameters

pName [in]

A pointer to a null-terminated string that specifies the name of the server on which the print processor should be installed. If this parameter is NULL, the print processor is installed locally.

pEnvironment [in]

A pointer to a null-terminated string that specifies the environment (for example, Windows x86, Windows IA64, or Windows x64). If this parameter is NULL, the current environment of the caller/client (not of the destination/server) is used.

pPathName [in]

A pointer to a null-terminated string that specifies the name of the file that contains the print processor. This file must be in the system print-processor directory.

pPrintProcessorName [in]

A pointer to a null-terminated string that specifies the name of the print processor.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero.

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 caller must have the SeLoadDriverPrivilege.

Before calling the AddPrintProcessor function, an application should verify that the file containing the print processor is stored in the system print-processor directory. An application can retrieve the name of the system print-processor directory by calling the GetPrintProcessorDirectory function.

An application can determine the name of existing print processors by calling the EnumPrintProcessors function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winspool.h (include Windows.h)

Library

Winspool.lib

DLL

Winspool.drv

Unicode and ANSI names

AddPrintProcessorW (Unicode) and AddPrintProcessorA (ANSI)

See also

Printing
Print Spooler API Functions
EnumPrintProcessors
GetPrintProcessorDirectory

 

 

Community Additions

ADD
Show:
© 2015 Microsoft