[This is preliminary documentation and subject to change.]
The PRINTER_INFO_7 structure specifies directory services printer information. Use this structure with the SetPrinter function to publish a printer's data in the directory service (DS), or to update or remove a printer's published data from the DS. Use this structure with the GetPrinter function to determine whether a printer is published in the DS.
typedef struct _PRINTER_INFO_7 {
LPTSTR pszObjectGUID;
DWORD dwAction;
} PRINTER_INFO_7, *PPRINTER_INFO_7, *LPPRINTER_INFO_7;
Value | Description |
---|---|
DSPRINT_PUBLISH | SetPrinter: Publishes the printer's data in the DS. GetPrinter: Indicates the printer is published. |
DSPRINT_UNPUBLISH | SetPrinter: Removes the printer's published data from the DS. GetPrinter: Indicates the printer is not published. |
DSPRINT_UPDATE | SetPrinter: Updates the printer's published data in the DS. GetPrinter never returns this value. |
The PRINTER_INFO_7 structure is used in a SetPrinter call to publish printer information to the directory service. The published data includes all values and data for the specified printer found under the SPLDS_SPOOLER_KEY, SPLDS_DRIVER_KEY, or SPLDS_USER_KEY keys created by SetPrinterDataEx. Before calling SetPrinter, set pszObjectGUID to NULL.
For GetPrinter, pszObjectGUID returns the GUID of the directory services print queue object associated with a published printer. You can use this GUID with Active Directory Services Interface (ADSI) methods to retrieve published data for the printer. However, the recommended method for retrieving published data is to call the GetPrinterDataEx function.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winspool.h.
Unicode: Defined as Unicode and ANSI structures.
Printing and Print Spooler Overview, Printing and Print Spooler Structures, EnumPrinters, GetPrinter, GetPrinterDataEx, OpenPrinter, PRINTER_INFO_1, PRINTER_INFO_2, PRINTER_INFO_3, SetPrinter, SetPrinterDataEx