Winspool.PRINTER_INFO_2 (JNA API)

com.sun.jna.platform.win32

## Class Winspool.PRINTER_INFO_2

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.Winspool.PRINTER_INFO_2

- Enclosing interface:
    Winspool

      public static class Winspool.PRINTER_INFO_2
      extends Structure

  The PRINTER_INFO_2 structure specifies detailed printer information.
  Author:
    Ivan Ridao Freitas, Padrus
  See Also:
    PRINTER_INFO_2 structure

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.ByReference, Structure.ByValue, Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `Attributes` The printer attributes.
    `int` | `AveragePPM` The average number of pages per minute that have been printed on the printer.
    `int` | `cJobs` The number of print jobs that have been queued for the printer.
    `int` | `DefaultPriority` The default priority value assigned to each print job.
    `static java.util.List<java.lang.String>` | `FIELDS`
    `java.lang.String` | `pComment` A pointer to a null-terminated string that provides a brief description of the printer.
    `java.lang.String` | `pDatatype` A pointer to a null-terminated string that specifies the data type used to record the print job.
    `WinDef.INT_PTR` | `pDevMode` A pointer to a DEVMODE structure that defines default printer data such as the paper orientation and the resolution.
    `java.lang.String` | `pDriverName` A pointer to a null-terminated string that specifies the name of the printer driver.
    `java.lang.String` | `pLocation` A pointer to a null-terminated string that specifies the physical location of the printer (for example, "Bldg.
    `java.lang.String` | `pParameters` A pointer to a null-terminated string that specifies the default print-processor parameters.
    `java.lang.String` | `pPortName` A pointer to a null-terminated string that identifies the port(s) used to transmit data to the printer.
    `java.lang.String` | `pPrinterName` A pointer to a null-terminated string that specifies the name of the printer.
    `java.lang.String` | `pPrintProcessor` A pointer to a null-terminated string that specifies the name of the print processor used by the printer.
    `int` | `Priority` A priority value that the spooler uses to route print jobs.
    `WinDef.INT_PTR` | `pSecurityDescriptor` A pointer to a SECURITY_DESCRIPTOR structure for the printer.
    `java.lang.String` | `pSepFile` A pointer to a null-terminated string that specifies the name of the file used to create the separator page.
    `java.lang.String` | `pServerName` A pointer to a null-terminated string identifying the server that controls the printer.
    `java.lang.String` | `pShareName` A pointer to a null-terminated string that identifies the share point for the printer.
    `int` | `StartTime` The earliest time at which the printer will print a job.
    `int` | `Status` The printer status.
    `int` | `UntilTime` The latest time at which the printer will print a job.

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Winspool.PRINTER_INFO_2()`
    `Winspool.PRINTER_INFO_2(int size)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.List<java.lang.String>` | `getFieldOrder()` Return this Structure's field names in their proper order.
    `boolean` | `hasAttribute(int value)` Checks if the printer attributes have one of the values PRINTER_ATTRIBUTE_XXX.

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### FIELDS

          public static final java.util.List<java.lang.String> FIELDS

    - #### pServerName

          public java.lang.String pServerName

      A pointer to a null-terminated string identifying the server that controls the printer. If this string is NULL, the printer is controlled locally.

    - #### pPrinterName

          public java.lang.String pPrinterName

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

    - #### pShareName

          public java.lang.String pShareName

      A pointer to a null-terminated string that identifies the share point for the printer. (This string is used only if the PRINTER_ATTRIBUTE_SHARED constant was set for the Attributes member.)

    - #### pPortName

          public java.lang.String pPortName

      A pointer to a null-terminated string that identifies the port(s) used to transmit data to the printer. If a printer is connected to more than one port, the names of each port must be separated by commas (for example, "LPT1:,LPT2:,LPT3:").

    - #### pDriverName

          public java.lang.String pDriverName

      A pointer to a null-terminated string that specifies the name of the printer driver.

    - #### pComment

          public java.lang.String pComment

      A pointer to a null-terminated string that provides a brief description of the printer.

    - #### pLocation

          public java.lang.String pLocation

      A pointer to a null-terminated string that specifies the physical location of the printer (for example, "Bldg. 38, Room 1164").

    - #### pDevMode

          public WinDef.INT_PTR pDevMode

      A pointer to a DEVMODE structure that defines default printer data such as the paper orientation and the resolution.

    - #### pSepFile

          public java.lang.String pSepFile

      A pointer to a null-terminated string that specifies the name of the file used to create the separator page. This page is used to separate print jobs sent to the printer.

    - #### pPrintProcessor

          public java.lang.String pPrintProcessor

      A pointer to a null-terminated string that specifies the name of the print processor used by the printer. You can use the EnumPrintProcessors function to obtain a list of print processors installed on a server.

    - #### pDatatype

          public java.lang.String pDatatype

      A pointer to a null-terminated string that specifies the data type used to record the print job. You can use the EnumPrintProcessorDatatypes function to obtain a list of data types supported by a specific print processor.

    - #### pParameters

          public java.lang.String pParameters

      A pointer to a null-terminated string that specifies the default print-processor parameters.

    - #### pSecurityDescriptor

          public WinDef.INT_PTR pSecurityDescriptor

      A pointer to a SECURITY_DESCRIPTOR structure for the printer. This member may be NULL.

    - #### Attributes

          public int Attributes

      The printer attributes. This member can be any reasonable combination of the values PRINTER_ATTRIBUTE_XXX.

    - #### Priority

          public int Priority

      A priority value that the spooler uses to route print jobs.

    - #### DefaultPriority

          public int DefaultPriority

      The default priority value assigned to each print job.

    - #### StartTime

          public int StartTime

      The earliest time at which the printer will print a job. This value is expressed as minutes elapsed since 12:00 AM GMT (Greenwich Mean Time).

    - #### UntilTime

          public int UntilTime

      The latest time at which the printer will print a job. This value is expressed as minutes elapsed since 12:00 AM GMT (Greenwich Mean Time).

    - #### Status

          public int Status

      The printer status. This member can be any reasonable combination of the values PRINTER_STATUS_XXX.

    - #### cJobs

          public int cJobs

      The number of print jobs that have been queued for the printer.

    - #### AveragePPM

          public int AveragePPM

      The average number of pages per minute that have been printed on the printer.

  - ### Constructor Detail

    - #### Winspool.PRINTER_INFO_2

          public Winspool.PRINTER_INFO_2()

    - #### Winspool.PRINTER_INFO_2

          public Winspool.PRINTER_INFO_2(int size)

  - ### Method Detail

    - #### getFieldOrder

          protected java.util.List<java.lang.String> getFieldOrder()

      Description copied from class: `Structure`
      Return this Structure's field names in their proper order. For example,

           protected List getFieldOrder() {
               return Arrays.asList(new String[] { ... });
           }

      IMPORTANT When deriving from an existing Structure subclass, ensure that you augment the list provided by the superclass, e.g.

           protected List getFieldOrder() {
               List fields = new ArrayList(super.getFieldOrder());
               fields.addAll(Arrays.asList(new String[] { ... }));
               return fields;
           }

      Field order must be explicitly indicated, since the field order as returned by `Class.getFields()` is not guaranteed to be predictable.
      Specified by:
        `getFieldOrder` in class `Structure`
      Returns:
        ordered list of field names

    - #### hasAttribute

          public boolean hasAttribute(int value)

      Checks if the printer attributes have one of the values PRINTER_ATTRIBUTE_XXX.

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.