PRINTER_INFO_7

[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;
 

Members

pszObjectGUID
Pointer to a null-terminated string containing the GUID of the directory service print queue object associated with a published printer.
dwAction
Indicates the action for the SetPrinter function to perform. For the GetPrinter function, this member indicates whether the specified printer is published. This member can be one of the following values.
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.


Remarks

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.

QuickInfo

  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.

See Also

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