Winspool (JNA API)
Description: declaration: package: com.sun.jna.platform.win32, interface: Winspool

Package com.sun.jna.platform.win32

# Interface Winspool

All Superinterfaces:
  `AltCallingConvention`, `Library`, `StdCall`, `StdCallLibrary`

public interface Winspool extends StdCallLibrary
Ported from Winspool.h. Windows SDK 6.0a

Author:
  dblock[at]dblock.org

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static class`
  `Winspool.JOB_INFO_1`
  The JOB_INFO_1 structure specifies print-job information such as the job-identifier value, the name of the printer for which the job is spooled, the name of the machine that created the print job, the name of the user that owns the print job, and so on.
  `static class`
  `Winspool.LPPRINTER_DEFAULTS`
  The PRINTER_DEFAULTS structure specifies the default data type, environment, initialization data, and access rights for a printer.
  `static class`
  `Winspool.NOTIFY_DATA`
  A union of data information based on the Type and Field members of `Winspool.PRINTER_NOTIFY_INFO_DATA`
  `static class`
  `Winspool.NOTIFY_DATA_DATA`
  A struct containing non-numeric notification data - conditional content of a `Winspool.NOTIFY_DATA` union.
  `static class`
  `Winspool.PRINTER_INFO_1`
  The PRINTER_INFO_1 structure specifies general printer information.
  `static class`
  `Winspool.PRINTER_INFO_2`
  The PRINTER_INFO_2 structure specifies detailed printer information.
  `static class`
  `Winspool.PRINTER_INFO_4`
  The PRINTER_INFO_4 structure specifies general printer information.
  `static class`
  `Winspool.PRINTER_NOTIFY_INFO`
  The PRINTER_NOTIFY_INFO structure contains printer information returned by the FindNextPrinterChangeNotification function.
  `static class`
  `Winspool.PRINTER_NOTIFY_INFO_DATA`
  The PRINTER_NOTIFY_INFO_DATA structure identifies a job or printer information field and provides the current data for that field.
  `static class`
  `Winspool.PRINTER_NOTIFY_OPTIONS`
  The PRINTER_NOTIFY_OPTIONS structure specifies options for a change notification object that monitors a printer or print server.
  `static class`
  `Winspool.PRINTER_NOTIFY_OPTIONS_TYPE`
  The PRINTER_NOTIFY_OPTIONS_TYPE structure specifies the set of printer or job information fields to be monitored by a printer change notification object.

  ## Nested classes/interfaces inherited from interface com.sun.jna.Library

  `Library.Handler`

  ## Nested classes/interfaces inherited from interface com.sun.jna.win32.StdCallLibrary

  `StdCallLibrary.StdCallCallback`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CCHDEVICENAME`
  `static final Winspool`
  `INSTANCE`
  `static final int`
  `JOB_CONTROL_CANCEL`
  `static final int`
  `JOB_CONTROL_DELETE`
  `static final int`
  `JOB_CONTROL_LAST_PAGE_EJECTED`
  `static final int`
  `JOB_CONTROL_PAUSE`
  `static final int`
  `JOB_CONTROL_RELEASE`
  `static final int`
  `JOB_CONTROL_RESTART`
  `static final int`
  `JOB_CONTROL_RESUME`
  `static final int`
  `JOB_CONTROL_RETAIN`
  `static final int`
  `JOB_CONTROL_SENT_TO_PRINTER`
  `static final short`
  `JOB_NOTIFY_FIELD_BYTES_PRINTED`
  `static final short`
  `JOB_NOTIFY_FIELD_DATATYPE`
  `static final short`
  `JOB_NOTIFY_FIELD_DEVMODE`
  `static final short`
  `JOB_NOTIFY_FIELD_DOCUMENT`
  `static final short`
  `JOB_NOTIFY_FIELD_DRIVER_NAME`
  `static final short`
  `JOB_NOTIFY_FIELD_MACHINE_NAME`
  `static final short`
  `JOB_NOTIFY_FIELD_NOTIFY_NAME`
  `static final short`
  `JOB_NOTIFY_FIELD_PAGES_PRINTED`
  `static final short`
  `JOB_NOTIFY_FIELD_PARAMETERS`
  `static final short`
  `JOB_NOTIFY_FIELD_PORT_NAME`
  `static final short`
  `JOB_NOTIFY_FIELD_POSITION`
  `static final short`
  `JOB_NOTIFY_FIELD_PRINT_PROCESSOR`
  `static final short`
  `JOB_NOTIFY_FIELD_PRINTER_NAME`
  `static final short`
  `JOB_NOTIFY_FIELD_PRIORITY`
  `static final short`
  `JOB_NOTIFY_FIELD_REMOTE_JOB_ID`
  `static final short`
  `JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR`
  `static final short`
  `JOB_NOTIFY_FIELD_START_TIME`
  `static final short`
  `JOB_NOTIFY_FIELD_STATUS`
  `static final short`
  `JOB_NOTIFY_FIELD_STATUS_STRING`
  `static final short`
  `JOB_NOTIFY_FIELD_SUBMITTED`
  `static final short`
  `JOB_NOTIFY_FIELD_TIME`
  `static final short`
  `JOB_NOTIFY_FIELD_TOTAL_BYTES`
  `static final short`
  `JOB_NOTIFY_FIELD_TOTAL_PAGES`
  `static final short`
  `JOB_NOTIFY_FIELD_UNTIL_TIME`
  `static final short`
  `JOB_NOTIFY_FIELD_USER_NAME`
  `static final int`
  `JOB_NOTIFY_TYPE`
  `static final int`
  `PRINTER_ATTRIBUTE_DEFAULT`
  `static final int`
  `PRINTER_ATTRIBUTE_DIRECT`
  `static final int`
  `PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST`
  `static final int`
  `PRINTER_ATTRIBUTE_ENABLE_BIDI`
  `static final int`
  `PRINTER_ATTRIBUTE_ENABLE_DEVQ`
  `static final int`
  `PRINTER_ATTRIBUTE_FAX`
  `static final int`
  `PRINTER_ATTRIBUTE_FRIENDLY_NAME`
  `static final int`
  `PRINTER_ATTRIBUTE_HIDDEN`
  `static final int`
  `PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS`
  `static final int`
  `PRINTER_ATTRIBUTE_LOCAL`
  `static final int`
  `PRINTER_ATTRIBUTE_MACHINE`
  `static final int`
  `PRINTER_ATTRIBUTE_NETWORK`
  `static final int`
  `PRINTER_ATTRIBUTE_PUBLISHED`
  `static final int`
  `PRINTER_ATTRIBUTE_PUSHED_MACHINE`
  `static final int`
  `PRINTER_ATTRIBUTE_PUSHED_USER`
  `static final int`
  `PRINTER_ATTRIBUTE_QUEUED`
  `static final int`
  `PRINTER_ATTRIBUTE_RAW_ONLY`
  `static final int`
  `PRINTER_ATTRIBUTE_SHARED`
  `static final int`
  `PRINTER_ATTRIBUTE_TS`
  `static final int`
  `PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER`
  `static final int`
  `PRINTER_ATTRIBUTE_WORK_OFFLINE`
  `static final int`
  `PRINTER_CHANGE_ADD_FORM`
  `static final int`
  `PRINTER_CHANGE_ADD_JOB`
  `static final int`
  `PRINTER_CHANGE_ADD_PORT`
  `static final int`
  `PRINTER_CHANGE_ADD_PRINT_PROCESSOR`
  `static final int`
  `PRINTER_CHANGE_ADD_PRINTER`
  `static final int`
  `PRINTER_CHANGE_ADD_PRINTER_DRIVER`
  `static final int`
  `PRINTER_CHANGE_ALL`
  `static final int`
  `PRINTER_CHANGE_ALL_WIN7`
  `static final int`
  `PRINTER_CHANGE_CONFIGURE_PORT`
  `static final int`
  `PRINTER_CHANGE_DELETE_FORM`
  `static final int`
  `PRINTER_CHANGE_DELETE_JOB`
  `static final int`
  `PRINTER_CHANGE_DELETE_PORT`
  `static final int`
  `PRINTER_CHANGE_DELETE_PRINT_PROCESSOR`
  `static final int`
  `PRINTER_CHANGE_DELETE_PRINTER`
  `static final int`
  `PRINTER_CHANGE_DELETE_PRINTER_DRIVER`
  `static final int`
  `PRINTER_CHANGE_FAILED_CONNECTION_PRINTER`
  `static final int`
  `PRINTER_CHANGE_FORM`
  `static final int`
  `PRINTER_CHANGE_JOB`
  `static final int`
  `PRINTER_CHANGE_PORT`
  `static final int`
  `PRINTER_CHANGE_PRINT_PROCESSOR`
  `static final int`
  `PRINTER_CHANGE_PRINTER`
  `static final int`
  `PRINTER_CHANGE_PRINTER_DRIVER`
  `static final int`
  `PRINTER_CHANGE_SERVER`
  `static final int`
  `PRINTER_CHANGE_SET_FORM`
  `static final int`
  `PRINTER_CHANGE_SET_JOB`
  `static final int`
  `PRINTER_CHANGE_SET_PRINTER`
  `static final int`
  `PRINTER_CHANGE_SET_PRINTER_DRIVER`
  `static final int`
  `PRINTER_CHANGE_TIMEOUT`
  `static final int`
  `PRINTER_CHANGE_WRITE_JOB`
  `static final int`
  `PRINTER_CONTROL_PAUSE`
  `static final int`
  `PRINTER_CONTROL_PURGE`
  `static final int`
  `PRINTER_CONTROL_RESUME`
  `static final int`
  `PRINTER_CONTROL_SET_STATUS`
  `static final int`
  `PRINTER_ENUM_CONNECTIONS`
  `static final int`
  `PRINTER_ENUM_CONTAINER`
  `static final int`
  `PRINTER_ENUM_DEFAULT`
  `static final int`
  `PRINTER_ENUM_EXPAND`
  `static final int`
  `PRINTER_ENUM_FAVORITE`
  `static final int`
  `PRINTER_ENUM_HIDE`
  `static final int`
  `PRINTER_ENUM_ICON1`
  `static final int`
  `PRINTER_ENUM_ICON2`
  `static final int`
  `PRINTER_ENUM_ICON3`
  `static final int`
  `PRINTER_ENUM_ICON4`
  `static final int`
  `PRINTER_ENUM_ICON5`
  `static final int`
  `PRINTER_ENUM_ICON6`
  `static final int`
  `PRINTER_ENUM_ICON7`
  `static final int`
  `PRINTER_ENUM_ICON8`
  `static final int`
  `PRINTER_ENUM_ICONMASK`
  `static final int`
  `PRINTER_ENUM_LOCAL`
  `static final int`
  `PRINTER_ENUM_NAME`
  `static final int`
  `PRINTER_ENUM_NETWORK`
  `static final int`
  `PRINTER_ENUM_REMOTE`
  `static final int`
  `PRINTER_ENUM_SHARED`
  `static final int`
  `PRINTER_NOTIFY_CATEGORY_3D`
  `static final int`
  `PRINTER_NOTIFY_CATEGORY_ALL`
  `static final short`
  `PRINTER_NOTIFY_FIELD_ATTRIBUTES`
  `static final short`
  `PRINTER_NOTIFY_FIELD_AVERAGE_PPM`
  `static final short`
  `PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING`
  `static final short`
  `PRINTER_NOTIFY_FIELD_BYTES_PRINTED`
  `static final short`
  `PRINTER_NOTIFY_FIELD_CJOBS`
  `static final short`
  `PRINTER_NOTIFY_FIELD_COMMENT`
  `static final short`
  `PRINTER_NOTIFY_FIELD_DATATYPE`
  `static final short`
  `PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY`
  `static final short`
  `PRINTER_NOTIFY_FIELD_DEVMODE`
  `static final short`
  `PRINTER_NOTIFY_FIELD_DRIVER_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_FRIENDLY_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_LOCATION`
  `static final short`
  `PRINTER_NOTIFY_FIELD_OBJECT_GUID`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PAGES_PRINTED`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PARAMETERS`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PORT_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PRINTER_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_PRIORITY`
  `static final short`
  `PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR`
  `static final short`
  `PRINTER_NOTIFY_FIELD_SEPFILE`
  `static final short`
  `PRINTER_NOTIFY_FIELD_SERVER_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_SHARE_NAME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_START_TIME`
  `static final short`
  `PRINTER_NOTIFY_FIELD_STATUS`
  `static final short`
  `PRINTER_NOTIFY_FIELD_STATUS_STRING`
  `static final short`
  `PRINTER_NOTIFY_FIELD_TOTAL_BYTES`
  `static final short`
  `PRINTER_NOTIFY_FIELD_TOTAL_PAGES`
  `static final short`
  `PRINTER_NOTIFY_FIELD_UNTIL_TIME`
  `static final int`
  `PRINTER_NOTIFY_INFO_DISCARDED`
  `static final int`
  `PRINTER_NOTIFY_OPTIONS_REFRESH`
  `static final int`
  `PRINTER_NOTIFY_TYPE`
  `static final int`
  `PRINTER_STATUS_BUSY`
  `static final int`
  `PRINTER_STATUS_DOOR_OPEN`
  `static final int`
  `PRINTER_STATUS_ERROR`
  `static final int`
  `PRINTER_STATUS_INITIALIZING`
  `static final int`
  `PRINTER_STATUS_IO_ACTIVE`
  `static final int`
  `PRINTER_STATUS_MANUAL_FEED`
  `static final int`
  `PRINTER_STATUS_NO_TONER`
  `static final int`
  `PRINTER_STATUS_NOT_AVAILABLE`
  `static final int`
  `PRINTER_STATUS_OFFLINE`
  `static final int`
  `PRINTER_STATUS_OUT_OF_MEMORY`
  `static final int`
  `PRINTER_STATUS_OUTPUT_BIN_FULL`
  `static final int`
  `PRINTER_STATUS_PAGE_PUNT`
  `static final int`
  `PRINTER_STATUS_PAPER_JAM`
  `static final int`
  `PRINTER_STATUS_PAPER_OUT`
  `static final int`
  `PRINTER_STATUS_PAPER_PROBLEM`
  `static final int`
  `PRINTER_STATUS_PAUSED`
  `static final int`
  `PRINTER_STATUS_PENDING_DELETION`
  `static final int`
  `PRINTER_STATUS_POWER_SAVE`
  `static final int`
  `PRINTER_STATUS_PRINTING`
  `static final int`
  `PRINTER_STATUS_PROCESSING`
  `static final int`
  `PRINTER_STATUS_SERVER_UNKNOWN`
  `static final int`
  `PRINTER_STATUS_TONER_LOW`
  `static final int`
  `PRINTER_STATUS_USER_INTERVENTION`
  `static final int`
  `PRINTER_STATUS_WAITING`
  `static final int`
  `PRINTER_STATUS_WARMING_UP`

  ### Fields inherited from interface com.sun.jna.Library

  `OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER`

  ### Fields inherited from interface com.sun.jna.win32.StdCallLibrary

  `FUNCTION_MAPPER, STDCALL_CONVENTION`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `ClosePrinter(WinNT.HANDLE hPrinter)`
  The ClosePrinter function closes the specified printer object.
  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.
  `boolean`
  `EnumJobs(WinNT.HANDLE hPrinter, int FirstJob, int NoJobs, int Level, Pointer pJob, int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned)`
  The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
  `boolean`
  `EnumPrinters(int Flags, String Name, int Level, Pointer pPrinterEnum, int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned)`
  The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
  `boolean`
  `FindClosePrinterChangeNotification(WinNT.HANDLE hChange)`
  The FindClosePrinterChangeNotification function closes a change notification object created by calling the FindFirstPrinterChangeNotification function.
  `WinNT.HANDLE`
  `FindFirstPrinterChangeNotification(WinNT.HANDLE hPrinter, int fdwFilter, int fdwOptions, WinDef.LPVOID pPrinterNotifyOptions)`
  Deprecated.
  `WinNT.HANDLE`
  `FindFirstPrinterChangeNotification(WinNT.HANDLE hPrinter, int fdwFilter, int fdwOptions, Winspool.PRINTER_NOTIFY_OPTIONS pPrinterNotifyOptions)`
  The FindFirstPrinterChangeNotification function creates a change notification object and returns a handle to the object.
  `boolean`
  `FindNextPrinterChangeNotification(WinNT.HANDLE hChange, WinDef.DWORDByReference pdwChange, WinDef.LPVOID pPrinterNotifyOptions, WinDef.LPVOID ppPrinterNotifyInfo)`
  Deprecated.
  `boolean`
  `FindNextPrinterChangeNotification(WinNT.HANDLE hChange, WinDef.DWORDByReference pdwChange, Winspool.PRINTER_NOTIFY_OPTIONS pPrinterNotifyOptions, PointerByReference ppPrinterNotifyInfo)`
  The FindNextPrinterChangeNotification function retrieves information about the most recent change notification for a change notification object associated with a printer or print server.
  `boolean`
  `FreePrinterNotifyInfo(Pointer pPrinterNotifyInfo)`
  The FreePrinterNotifyInfo function frees a system-allocated buffer created by the FindNextPrinterChangeNotification function.
  `boolean`
  `GetPrinter(WinNT.HANDLE hPrinter, int Level, Pointer pPrinter, int cbBuf, IntByReference pcbNeeded)`
  The GetPrinter function retrieves information about a specified printer.
  `boolean`
  `OpenPrinter(String pPrinterName, WinNT.HANDLEByReference phPrinter, Winspool.LPPRINTER_DEFAULTS pDefault)`
  The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem.
  `boolean`
  `SetJob(WinNT.HANDLE hPrinter, int JobId, int Level, Pointer pJob, int Command)`
  The SetJob function pauses, resumes, cancels, or restarts a print job on a specified printer.
  `boolean`
  `SetPrinter(WinNT.HANDLE hPrinter, int Level, Pointer pPrinter, int Command)`
  The SetPrinter function sets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.

- ## Field Details

  - ### INSTANCE

    static final Winspool INSTANCE

  - ### CCHDEVICENAME

    static final int CCHDEVICENAME
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PAUSED

    static final int PRINTER_STATUS_PAUSED
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_ERROR

    static final int PRINTER_STATUS_ERROR
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PENDING_DELETION

    static final int PRINTER_STATUS_PENDING_DELETION
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PAPER_JAM

    static final int PRINTER_STATUS_PAPER_JAM
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PAPER_OUT

    static final int PRINTER_STATUS_PAPER_OUT
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_MANUAL_FEED

    static final int PRINTER_STATUS_MANUAL_FEED
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PAPER_PROBLEM

    static final int PRINTER_STATUS_PAPER_PROBLEM
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_OFFLINE

    static final int PRINTER_STATUS_OFFLINE
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_IO_ACTIVE

    static final int PRINTER_STATUS_IO_ACTIVE
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_BUSY

    static final int PRINTER_STATUS_BUSY
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PRINTING

    static final int PRINTER_STATUS_PRINTING
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_OUTPUT_BIN_FULL

    static final int PRINTER_STATUS_OUTPUT_BIN_FULL
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_NOT_AVAILABLE

    static final int PRINTER_STATUS_NOT_AVAILABLE
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_WAITING

    static final int PRINTER_STATUS_WAITING
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PROCESSING

    static final int PRINTER_STATUS_PROCESSING
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_INITIALIZING

    static final int PRINTER_STATUS_INITIALIZING
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_WARMING_UP

    static final int PRINTER_STATUS_WARMING_UP
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_TONER_LOW

    static final int PRINTER_STATUS_TONER_LOW
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_NO_TONER

    static final int PRINTER_STATUS_NO_TONER
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_PAGE_PUNT

    static final int PRINTER_STATUS_PAGE_PUNT
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_USER_INTERVENTION

    static final int PRINTER_STATUS_USER_INTERVENTION
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_OUT_OF_MEMORY

    static final int PRINTER_STATUS_OUT_OF_MEMORY
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_DOOR_OPEN

    static final int PRINTER_STATUS_DOOR_OPEN
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_SERVER_UNKNOWN

    static final int PRINTER_STATUS_SERVER_UNKNOWN
    See Also:
      - Constant Field Values

  - ### PRINTER_STATUS_POWER_SAVE

    static final int PRINTER_STATUS_POWER_SAVE
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_QUEUED

    static final int PRINTER_ATTRIBUTE_QUEUED
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_DIRECT

    static final int PRINTER_ATTRIBUTE_DIRECT
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_DEFAULT

    static final int PRINTER_ATTRIBUTE_DEFAULT
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_SHARED

    static final int PRINTER_ATTRIBUTE_SHARED
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_NETWORK

    static final int PRINTER_ATTRIBUTE_NETWORK
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_HIDDEN

    static final int PRINTER_ATTRIBUTE_HIDDEN
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_LOCAL

    static final int PRINTER_ATTRIBUTE_LOCAL
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_ENABLE_DEVQ

    static final int PRINTER_ATTRIBUTE_ENABLE_DEVQ
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS

    static final int PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST

    static final int PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_WORK_OFFLINE

    static final int PRINTER_ATTRIBUTE_WORK_OFFLINE
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_ENABLE_BIDI

    static final int PRINTER_ATTRIBUTE_ENABLE_BIDI
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_RAW_ONLY

    static final int PRINTER_ATTRIBUTE_RAW_ONLY
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_PUBLISHED

    static final int PRINTER_ATTRIBUTE_PUBLISHED
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_FAX

    static final int PRINTER_ATTRIBUTE_FAX
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_TS

    static final int PRINTER_ATTRIBUTE_TS
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_PUSHED_USER

    static final int PRINTER_ATTRIBUTE_PUSHED_USER
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_PUSHED_MACHINE

    static final int PRINTER_ATTRIBUTE_PUSHED_MACHINE
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_MACHINE

    static final int PRINTER_ATTRIBUTE_MACHINE
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_FRIENDLY_NAME

    static final int PRINTER_ATTRIBUTE_FRIENDLY_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER

    static final int PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_PRINTER

    static final int PRINTER_CHANGE_ADD_PRINTER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_SET_PRINTER

    static final int PRINTER_CHANGE_SET_PRINTER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_PRINTER

    static final int PRINTER_CHANGE_DELETE_PRINTER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_FAILED_CONNECTION_PRINTER

    static final int PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_PRINTER

    static final int PRINTER_CHANGE_PRINTER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_JOB

    static final int PRINTER_CHANGE_ADD_JOB
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_SET_JOB

    static final int PRINTER_CHANGE_SET_JOB
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_JOB

    static final int PRINTER_CHANGE_DELETE_JOB
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_WRITE_JOB

    static final int PRINTER_CHANGE_WRITE_JOB
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_JOB

    static final int PRINTER_CHANGE_JOB
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_FORM

    static final int PRINTER_CHANGE_ADD_FORM
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_SET_FORM

    static final int PRINTER_CHANGE_SET_FORM
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_FORM

    static final int PRINTER_CHANGE_DELETE_FORM
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_FORM

    static final int PRINTER_CHANGE_FORM
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_PORT

    static final int PRINTER_CHANGE_ADD_PORT
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_CONFIGURE_PORT

    static final int PRINTER_CHANGE_CONFIGURE_PORT
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_PORT

    static final int PRINTER_CHANGE_DELETE_PORT
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_PORT

    static final int PRINTER_CHANGE_PORT
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_PRINT_PROCESSOR

    static final int PRINTER_CHANGE_ADD_PRINT_PROCESSOR
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_PRINT_PROCESSOR

    static final int PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_PRINT_PROCESSOR

    static final int PRINTER_CHANGE_PRINT_PROCESSOR
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_SERVER

    static final int PRINTER_CHANGE_SERVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ADD_PRINTER_DRIVER

    static final int PRINTER_CHANGE_ADD_PRINTER_DRIVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_SET_PRINTER_DRIVER

    static final int PRINTER_CHANGE_SET_PRINTER_DRIVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_DELETE_PRINTER_DRIVER

    static final int PRINTER_CHANGE_DELETE_PRINTER_DRIVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_PRINTER_DRIVER

    static final int PRINTER_CHANGE_PRINTER_DRIVER
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_TIMEOUT

    static final int PRINTER_CHANGE_TIMEOUT
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ALL_WIN7

    static final int PRINTER_CHANGE_ALL_WIN7
    See Also:
      - Constant Field Values

  - ### PRINTER_CHANGE_ALL

    static final int PRINTER_CHANGE_ALL
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_DEFAULT

    static final int PRINTER_ENUM_DEFAULT
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_LOCAL

    static final int PRINTER_ENUM_LOCAL
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_CONNECTIONS

    static final int PRINTER_ENUM_CONNECTIONS
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_FAVORITE

    static final int PRINTER_ENUM_FAVORITE
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_NAME

    static final int PRINTER_ENUM_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_REMOTE

    static final int PRINTER_ENUM_REMOTE
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_SHARED

    static final int PRINTER_ENUM_SHARED
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_NETWORK

    static final int PRINTER_ENUM_NETWORK
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_EXPAND

    static final int PRINTER_ENUM_EXPAND
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_CONTAINER

    static final int PRINTER_ENUM_CONTAINER
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICONMASK

    static final int PRINTER_ENUM_ICONMASK
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON1

    static final int PRINTER_ENUM_ICON1
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON2

    static final int PRINTER_ENUM_ICON2
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON3

    static final int PRINTER_ENUM_ICON3
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON4

    static final int PRINTER_ENUM_ICON4
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON5

    static final int PRINTER_ENUM_ICON5
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON6

    static final int PRINTER_ENUM_ICON6
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON7

    static final int PRINTER_ENUM_ICON7
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_ICON8

    static final int PRINTER_ENUM_ICON8
    See Also:
      - Constant Field Values

  - ### PRINTER_ENUM_HIDE

    static final int PRINTER_ENUM_HIDE
    See Also:
      - Constant Field Values

  - ### PRINTER_CONTROL_PAUSE

    static final int PRINTER_CONTROL_PAUSE
    See Also:
      - Constant Field Values

  - ### PRINTER_CONTROL_PURGE

    static final int PRINTER_CONTROL_PURGE
    See Also:
      - Constant Field Values

  - ### PRINTER_CONTROL_RESUME

    static final int PRINTER_CONTROL_RESUME
    See Also:
      - Constant Field Values

  - ### PRINTER_CONTROL_SET_STATUS

    static final int PRINTER_CONTROL_SET_STATUS
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_OPTIONS_REFRESH

    static final int PRINTER_NOTIFY_OPTIONS_REFRESH
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_INFO_DISCARDED

    static final int PRINTER_NOTIFY_INFO_DISCARDED
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_TYPE

    static final int PRINTER_NOTIFY_TYPE
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_TYPE

    static final int JOB_NOTIFY_TYPE
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_PAUSE

    static final int JOB_CONTROL_PAUSE
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_RESUME

    static final int JOB_CONTROL_RESUME
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_CANCEL

    static final int JOB_CONTROL_CANCEL
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_RESTART

    static final int JOB_CONTROL_RESTART
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_DELETE

    static final int JOB_CONTROL_DELETE
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_SENT_TO_PRINTER

    static final int JOB_CONTROL_SENT_TO_PRINTER
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_LAST_PAGE_EJECTED

    static final int JOB_CONTROL_LAST_PAGE_EJECTED
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_RETAIN

    static final int JOB_CONTROL_RETAIN
    See Also:
      - Constant Field Values

  - ### JOB_CONTROL_RELEASE

    static final int JOB_CONTROL_RELEASE
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_SERVER_NAME

    static final short PRINTER_NOTIFY_FIELD_SERVER_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PRINTER_NAME

    static final short PRINTER_NOTIFY_FIELD_PRINTER_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_SHARE_NAME

    static final short PRINTER_NOTIFY_FIELD_SHARE_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PORT_NAME

    static final short PRINTER_NOTIFY_FIELD_PORT_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_DRIVER_NAME

    static final short PRINTER_NOTIFY_FIELD_DRIVER_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_COMMENT

    static final short PRINTER_NOTIFY_FIELD_COMMENT
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_LOCATION

    static final short PRINTER_NOTIFY_FIELD_LOCATION
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_DEVMODE

    static final short PRINTER_NOTIFY_FIELD_DEVMODE
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_SEPFILE

    static final short PRINTER_NOTIFY_FIELD_SEPFILE
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR

    static final short PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PARAMETERS

    static final short PRINTER_NOTIFY_FIELD_PARAMETERS
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_DATATYPE

    static final short PRINTER_NOTIFY_FIELD_DATATYPE
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR

    static final short PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_ATTRIBUTES

    static final short PRINTER_NOTIFY_FIELD_ATTRIBUTES
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PRIORITY

    static final short PRINTER_NOTIFY_FIELD_PRIORITY
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY

    static final short PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_START_TIME

    static final short PRINTER_NOTIFY_FIELD_START_TIME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_UNTIL_TIME

    static final short PRINTER_NOTIFY_FIELD_UNTIL_TIME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_STATUS

    static final short PRINTER_NOTIFY_FIELD_STATUS
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_STATUS_STRING

    static final short PRINTER_NOTIFY_FIELD_STATUS_STRING
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_CJOBS

    static final short PRINTER_NOTIFY_FIELD_CJOBS
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_AVERAGE_PPM

    static final short PRINTER_NOTIFY_FIELD_AVERAGE_PPM
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_TOTAL_PAGES

    static final short PRINTER_NOTIFY_FIELD_TOTAL_PAGES
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_PAGES_PRINTED

    static final short PRINTER_NOTIFY_FIELD_PAGES_PRINTED
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_TOTAL_BYTES

    static final short PRINTER_NOTIFY_FIELD_TOTAL_BYTES
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_BYTES_PRINTED

    static final short PRINTER_NOTIFY_FIELD_BYTES_PRINTED
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_OBJECT_GUID

    static final short PRINTER_NOTIFY_FIELD_OBJECT_GUID
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_FRIENDLY_NAME

    static final short PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING

    static final short PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PRINTER_NAME

    static final short JOB_NOTIFY_FIELD_PRINTER_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_MACHINE_NAME

    static final short JOB_NOTIFY_FIELD_MACHINE_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PORT_NAME

    static final short JOB_NOTIFY_FIELD_PORT_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_USER_NAME

    static final short JOB_NOTIFY_FIELD_USER_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_NOTIFY_NAME

    static final short JOB_NOTIFY_FIELD_NOTIFY_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_DATATYPE

    static final short JOB_NOTIFY_FIELD_DATATYPE
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PRINT_PROCESSOR

    static final short JOB_NOTIFY_FIELD_PRINT_PROCESSOR
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PARAMETERS

    static final short JOB_NOTIFY_FIELD_PARAMETERS
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_DRIVER_NAME

    static final short JOB_NOTIFY_FIELD_DRIVER_NAME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_DEVMODE

    static final short JOB_NOTIFY_FIELD_DEVMODE
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_STATUS

    static final short JOB_NOTIFY_FIELD_STATUS
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_STATUS_STRING

    static final short JOB_NOTIFY_FIELD_STATUS_STRING
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR

    static final short JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_DOCUMENT

    static final short JOB_NOTIFY_FIELD_DOCUMENT
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PRIORITY

    static final short JOB_NOTIFY_FIELD_PRIORITY
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_POSITION

    static final short JOB_NOTIFY_FIELD_POSITION
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_SUBMITTED

    static final short JOB_NOTIFY_FIELD_SUBMITTED
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_START_TIME

    static final short JOB_NOTIFY_FIELD_START_TIME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_UNTIL_TIME

    static final short JOB_NOTIFY_FIELD_UNTIL_TIME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_TIME

    static final short JOB_NOTIFY_FIELD_TIME
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_TOTAL_PAGES

    static final short JOB_NOTIFY_FIELD_TOTAL_PAGES
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_PAGES_PRINTED

    static final short JOB_NOTIFY_FIELD_PAGES_PRINTED
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_TOTAL_BYTES

    static final short JOB_NOTIFY_FIELD_TOTAL_BYTES
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_BYTES_PRINTED

    static final short JOB_NOTIFY_FIELD_BYTES_PRINTED
    See Also:
      - Constant Field Values

  - ### JOB_NOTIFY_FIELD_REMOTE_JOB_ID

    static final short JOB_NOTIFY_FIELD_REMOTE_JOB_ID
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_CATEGORY_ALL

    static final int PRINTER_NOTIFY_CATEGORY_ALL
    See Also:
      - Constant Field Values

  - ### PRINTER_NOTIFY_CATEGORY_3D

    static final int PRINTER_NOTIFY_CATEGORY_3D
    See Also:
      - Constant Field Values

- ## Method Details

  - ### EnumPrinters

    boolean EnumPrinters(int Flags, String Name, int Level, Pointer pPrinterEnum, int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned)
    The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
    Parameters:
      `Flags` - The types of print objects that the function should enumerate.
      `Name` - If Level is 1, Flags contains PRINTER_ENUM_NAME, and Name is non-NULL, then Name is a pointer to a null-terminated string that specifies the name of the object to enumerate. This string can be the name of a server, a domain, or a print provider. If Level is 1, Flags contains PRINTER_ENUM_NAME, and Name is NULL, then the function enumerates the available print providers. If Level is 1, Flags contains PRINTER_ENUM_REMOTE, and Name is NULL, then the function enumerates the printers in the user's domain. If Level is 2 or 5,Name is a pointer to a null-terminated string that specifies the name of a server whose printers are to be enumerated. If this string is NULL, then the function enumerates the printers installed on the local computer. If Level is 4, Name should be NULL. The function always queries on the local computer. When Name is NULL, setting Flags to PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS enumerates printers that are installed on the local machine. These printers include those that are physically attached to the local machine as well as remote printers to which it has a network connection. When Name is not NULL, setting Flags to PRINTER_ENUM_LOCAL | PRINTER_ENUM_NAME enumerates the local printers that are installed on the server Name.
      `Level` - The type of data structures pointed to by pPrinterEnum. Valid values are 1, 2, 4, and 5, which correspond to the PRINTER_INFO_1, PRINTER_INFO_2 , PRINTER_INFO_4, and PRINTER_INFO_5 data structures.
      `pPrinterEnum` - A pointer to a buffer that receives an array of PRINTER_INFO_1, PRINTER_INFO_2, PRINTER_INFO_4, or PRINTER_INFO_5 structures. Each structure contains data that describes an available print object. If Level is 1, the array contains PRINTER_INFO_1 structures. If Level is 2, the array contains PRINTER_INFO_2 structures. If Level is 4, the array contains PRINTER_INFO_4 structures. If Level is 5, the array contains PRINTER_INFO_5 structures. The buffer must be large enough to receive the array of data structures and any strings or other data to which the structure members point. If the buffer is too small, the pcbNeeded parameter returns the required buffer size.
      `cbBuf` - The size, in bytes, of the buffer pointed to by pPrinterEnum.
      `pcbNeeded` - A pointer to a value that receives the number of bytes copied if the function succeeds or the number of bytes required if cbBuf is too small.
      `pcReturned` - A pointer to a value that receives the number of PRINTER_INFO_1, PRINTER_INFO_2 , PRINTER_INFO_4, or PRINTER_INFO_5 structures that the function returns in the array to which pPrinterEnum points.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - EnumPrinters function

  - ### GetPrinter

    boolean GetPrinter(WinNT.HANDLE hPrinter, int Level, Pointer pPrinter, int cbBuf, IntByReference pcbNeeded)
    The GetPrinter function retrieves information about a specified printer.
    Parameters:
      `hPrinter` - A handle to the printer for which the function retrieves information. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
      `Level` - The level or type of structure that the function stores into the buffer pointed to by pPrinter. This value can be 1, 2, 3, 4, 5, 6, 7, 8 or 9.
      `pPrinter` - A pointer to a buffer that receives a structure containing information about the specified printer. The buffer must be large enough to receive the structure and any strings or other data to which the structure members point. If the buffer is too small, the pcbNeeded parameter returns the required buffer size. The type of structure is determined by the value of Level.
      `cbBuf` - The size, in bytes, of the buffer pointed to by pPrinter.
      `pcbNeeded` - A pointer to a variable that the function sets to the size, in bytes, of the printer information. If cbBuf is smaller than this value, GetPrinter fails, and the value represents the required buffer size. If cbBuf is equal to or greater than this value, GetPrinter succeeds, and the value represents the number of bytes stored in the buffer.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - GetPrinter function

  - ### OpenPrinter

    boolean OpenPrinter(String pPrinterName, WinNT.HANDLEByReference phPrinter, Winspool.LPPRINTER_DEFAULTS pDefault)
    The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem.
    Parameters:
      `pPrinterName` - [in] A pointer to a null-terminated string that specifies the name of the printer or print server, the printer object, the XcvMonitor, or the XcvPort. For a printer object use: PrinterName, Job xxxx. For an XcvMonitor, use: ServerName, XcvMonitor MonitorName. For an XcvPort, use: ServerName, XcvPort PortName. If NULL, it indicates the local printer server.
      `phPrinter` - [out] A pointer to a variable that receives a handle (not thread safe) to the open printer or print server object. The phPrinter parameter can return an Xcv handle for use with the XcvData function. For more information about XcvData, see the DDK.
      `pDefault` - [in] A pointer to a PRINTER_DEFAULTS structure. This value can be NULL.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - OpenPrinter function

  - ### ClosePrinter

    boolean ClosePrinter(WinNT.HANDLE hPrinter)
    The ClosePrinter function closes the specified printer object.
    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.

    When the ClosePrinter function returns, the handle hPrinter is invalid, regardless of whether the function has succeeded or failed.

    Parameters:
      `hPrinter` - A handle to the printer object to be closed. This handle is returned by the OpenPrinter or AddPrinter function.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - ClosePrinter function

  - ### FindFirstPrinterChangeNotification

    @Deprecated WinNT.HANDLE FindFirstPrinterChangeNotification(WinNT.HANDLE hPrinter, int fdwFilter, int fdwOptions, WinDef.LPVOID pPrinterNotifyOptions)
    Deprecated.

  - ### FindFirstPrinterChangeNotification

    WinNT.HANDLE FindFirstPrinterChangeNotification(WinNT.HANDLE hPrinter, int fdwFilter, int fdwOptions, Winspool.PRINTER_NOTIFY_OPTIONS pPrinterNotifyOptions)
    The FindFirstPrinterChangeNotification function creates a change notification object and returns a handle to the object. You can then use this handle in a call to one of the wait functions to monitor changes to the printer or print server. The FindFirstPrinterChangeNotification call specifies the type of changes to be monitored. You can specify a set of conditions to monitor for changes, a set of printer information fields to monitor, or both. A wait operation on the change notification handle succeeds when one of the specified changes occurs in the specified printer or print server. You then call the FindNextPrinterChangeNotification function to retrieve information about the change, and to reset the change notification object for use in the next wait operation.
    Parameters:
      `hPrinter` - [in] A handle to the printer or print server that you want to monitor. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
      `fdwFilter` - The conditions that will cause the change notification object to enter a signaled state. A change notification occurs when one or more of the specified conditions are met. The fdwFilter parameter can be zero if pPrinterNotifyOptions is non-NULL.
      `fdwOptions` - Reserved; must be zero.
      `pPrinterNotifyOptions` - [in, optional] A pointer to a PRINTER_NOTIFY_OPTIONS structure. The pTypes member of this structure is an array of one or more PRINTER_NOTIFY_OPTIONS_TYPE structures, each of which specifies a printer information field to monitor. A change notification occurs when one or more of the specified fields changes. When a change occurs, the FindNextPrinterChangeNotification function can retrieve the new printer information. This parameter can be NULL if fdwFilter is nonzero. For a list of fields that can be monitored, see PRINTER_NOTIFY_OPTIONS_TYPE.
    Returns:
      If the function succeeds, the return value is a handle to a change notification object associated with the specified printer or print server. If the function fails, the return value is INVALID_HANDLE_VALUE.
    See Also:
      - FindFirstPrinterChangeNotification function

  - ### FindNextPrinterChangeNotification

    @Deprecated boolean FindNextPrinterChangeNotification(WinNT.HANDLE hChange, WinDef.DWORDByReference pdwChange, WinDef.LPVOID pPrinterNotifyOptions, WinDef.LPVOID ppPrinterNotifyInfo)
    Deprecated.

  - ### FindNextPrinterChangeNotification

    boolean FindNextPrinterChangeNotification(WinNT.HANDLE hChange, WinDef.DWORDByReference pdwChange, Winspool.PRINTER_NOTIFY_OPTIONS pPrinterNotifyOptions, PointerByReference ppPrinterNotifyInfo)
    The FindNextPrinterChangeNotification function retrieves information about the most recent change notification for a change notification object associated with a printer or print server. Call this function when a wait operation on the change notification object is satisfied. The function also resets the change notification object to the not-signaled state. You can then use the object in another wait operation to continue monitoring the printer or print server. The operating system will set the object to the signaled state the next time one of a specified set of changes occurs to the printer or print server. The FindFirstPrinterChangeNotification function creates the change notification object and specifies the set of changes to be monitored.
    Parameters:
      `hChange` - [in] A handle to a change notification object associated with a printer or print server. You obtain such a handle by calling the FindFirstPrinterChangeNotification function. The operating system sets this change notification object to the signaled state when it detects one of the changes specified in the object's change notification filter.
      `pdwChange` - [out, optional] A pointer to a variable whose bits are set to indicate the changes that occurred to cause the most recent notification. The bit flags that might be set correspond to those specified in the fdwFilter parameter of the FindFirstPrinterChangeNotification call. The system sets one or more of the following bit flags.
      `pPrinterNotifyOptions` - [in, optional] A pointer to a PRINTER_NOTIFY_OPTIONS structure. Set the Flags member of this structure to PRINTER_NOTIFY_OPTIONS_REFRESH, to cause the function to return the current data for all monitored printer information fields. The function ignores all other members of the structure. This parameter can be NULL.
      `ppPrinterNotifyInfo` - [out, optional] A pointer to a pointer variable that receives a pointer to a system-allocated, read-only buffer. Call the FreePrinterNotifyInfo function to free the buffer when you are finished with it. This parameter can be NULL if no information is required. The buffer contains a PRINTER_NOTIFY_INFO structure, which contains an array of PRINTER_NOTIFY_INFO_DATA structures. Each element of the array contains information about one of the fields specified in the pPrinterNotifyOptions parameter of the FindFirstPrinterChangeNotification call. Typically, the function provides data only for the fields that changed to cause the most recent notification. However, if the structure pointed to by the pPrinterNotifyOptions parameter specifies PRINTER_NOTIFY_OPTIONS_REFRESH, the function provides data for all monitored fields. If the PRINTER_NOTIFY_INFO_DISCARDED bit is set in the Flags member of the PRINTER_NOTIFY_INFO structure, an overflow or error occurred, and notifications may have been lost. In this case, no additional notifications will be sent until you make a second FindNextPrinterChangeNotification call that specifies PRINTER_NOTIFY_OPTIONS_REFRESH.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - FindClosePrinterChangeNotification function

  - ### FindClosePrinterChangeNotification

    boolean FindClosePrinterChangeNotification(WinNT.HANDLE hChange)
    The FindClosePrinterChangeNotification function closes a change notification object created by calling the FindFirstPrinterChangeNotification function. The printer or print server associated with the change notification object will no longer be monitored by that object.
    Parameters:
      `hChange` - [in] A handle to the change notification object to be closed. This is a handle created by calling the FindFirstPrinterChangeNotification function.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - FindClosePrinterChangeNotification function

  - ### FreePrinterNotifyInfo

    boolean FreePrinterNotifyInfo(Pointer pPrinterNotifyInfo)
    The FreePrinterNotifyInfo function frees a system-allocated buffer created by the FindNextPrinterChangeNotification function.
    Parameters:
      `pPrinterNotifyInfo` - [in] Pointer to a PRINTER_NOTIFY_INFO buffer returned from a call to the FindNextPrinterChangeNotification function. FreePrinterNotifyInfo deallocates this buffer.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - FreePrinterNotifyInfo function

  - ### EnumJobs

    boolean EnumJobs(WinNT.HANDLE hPrinter, int FirstJob, int NoJobs, int Level, Pointer pJob, int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned)
    The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
    Parameters:
      `hPrinter` - A handle to the printer object whose print jobs the function enumerates. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
      `FirstJob` - The zero-based position within the print queue of the first print job to enumerate. For example, a value of 0 specifies that enumeration should begin at the first print job in the print queue; a value of 9 specifies that enumeration should begin at the tenth print job in the print queue.
      `NoJobs` - The total number of print jobs to enumerate.
      `Level` - The type of information returned in the pJob buffer.
      `pJob` - A pointer to a buffer that receives an array of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures. The buffer must be large enough to receive the array of structures and any strings or other data to which the structure members point.
      `cbBuf` - The size, in bytes, of the pJob buffer.
      `pcbNeeded` - A pointer to a variable that receives the number of bytes copied if the function succeeds. If the function fails, the variable receives the number of bytes required.
      `pcReturned` - A pointer to a variable that receives the number of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures returned in the pJob buffer.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - EnumJobs function

  - ### SetJob

    boolean SetJob(WinNT.HANDLE hPrinter, int JobId, int Level, Pointer pJob, int Command)
    The SetJob function pauses, resumes, cancels, or restarts a print job on a specified printer. You can also use the SetJob function to set print job parameters, such as the print job priority and the document name. You can use the SetJob function to give a command to a print job, or to set print job parameters, or to do both in the same call. The value of the Command parameter does not affect how the function uses the Level and pJob parameters. Also, you can use SetJob with JOB_INFO_3 to link together a set of print jobs.
    Parameters:
      `hPrinter` - [in] A handle to the printer object of interest. Use the OpenPrinter, OpenPrinter2, or AddPrinter function to retrieve a printer handle.
      `JobId` - [in] Identifier that specifies the print job. You obtain a print job identifier by calling the AddJob function or the StartDoc function. If the Level parameter is set to 3, the JobId parameter must match theJobId member of the JOB_INFO_3 structure pointed to by pJob
      `Level` - [in] The type of job information structure pointed to by the pJob parameter. All versions of Windows: You can set the Level parameter to 0, 1, or 2. When you set Level to 0, pJob be NULL. Use these values when you are not setting any print job parameters. You can also set the Level parameter to 3. Starting with Windows Vista: You can also set the Level parameter to 4.
      `pJob` - [in] A pointer to a structure that sets the print job parameters. All versions of Windows: pJob can point to a JOB_INFO_1 or JOB_INFO_2 structure. pJob can also point to a JOB_INFO_3 structure. You must have JOB_ACCESS_ADMINISTER access permission for the jobs specified by the JobId and NextJobId members of the JOB_INFO_3 structure. Starting with Windows Vista: pJob can also point to a JOB_INFO_4 structure. If the Level parameter is 0, pJob should be NULL.
      `Command` - [in] The print job operation to perform. This parameter can be one of the JOB_CONTROL_XXX values. To cancel a job, do NOT use JOB_CONTROL_CANCEL, intead use JOB_CONTROL_DELETE to delete a job.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
    See Also:
      - SetJob function

  - ### SetPrinter

    boolean SetPrinter(WinNT.HANDLE hPrinter, int Level, Pointer pPrinter, int Command)
    The SetPrinter function sets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.
    Parameters:
      `hPrinter` - [in] A handle to the printer. Use the OpenPrinter, OpenPrinter2, or AddPrinter function to retrieve a printer handle.
      `Level` - [in] The type of data that the function stores into the buffer pointed to by pPrinter. If the Command parameter is not equal to zero, the Level parameter must be zero. This value can be 0, 2, 3, 4, 5, 6, 7, 8, or 9.
      `pPrinter` - A pointer to a buffer containing data to set for the printer, or containing information for the command specified by the Command parameter. The type of data in the buffer is determined by the value of Level.
      `Command` - The action to perform. If the Level parameter is nonzero, set the value of this parameter to zero. In this case, the printer retains its current state and the function reconfigures the printer data as specified by the Level and pPrinter parameters. If the Level parameter is zero, set the value of this parameter to one of the PRINTER_CONTROL_XXX values.
    Returns:
      If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. If Level is 7 and the publish action failed, SetPrinter returns ERROR_IO_PENDING and attempts to complete the action in the background. If Level is 7 and the update action failed, SetPrinter returns ERROR_FILE_NOT_FOUND.
    See Also:
      - SetPrinter function