Wiki Home

Win 32 Api Add Printer

Namespace: WIN_COM_API
Please describe Win 32 Api Add Printer here.

Add PrinterOffsite link to

The Add PrinterOffsite link to
function adds a printer to the list of supported printers for a specified server.

Code examples:


HANDLE Add PrinterOffsite link to
LPTSTR pName, // server name
DWORD Level, // printer information level
LPBYTE pPrinter // printer information buffer

FoxPro declaration:

DECLARE INTEGER Add PrinterOffsite link to
IN winspool.drv;
STRING pName,;
STRING @ pPrinter


[in] Pointer to a null-terminated string that specifies the name of the server on which the printer should be installed.

[in] Specifies the version of the structure to which pPrinter points. This value must be 2.

[in] Pointer to a PRINTER_INFO_2 structure that contains information about the printer.

Return value:

If the function succeeds, the return value is the handle to a new printer object.

My comment:

When you are finished with the handle, pass it to the Close Printer function to close it.

Use the Enum Print ProcessorsOffsite link to
function to enumerate the set of print processors installed on a server. Use the Enum Print Processor DatatypesOffsite link to
function to enumerate the set of data types that a print processor supports. Use the Enum PortsOffsite link to
function to enumerate the set of available ports. Use the Enum Printer DriversOffsite link to
function to enumerate the installed printer drivers.
( Topic last updated: 2005.04.26 04:32:38 AM )