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 and Description
    --- | ---
    `static class` | `Winspool.PRINTER_INFO_1`
    `static class` | `Winspool.PRINTER_INFO_4`

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

      `StdCallLibrary.StdCallCallback`

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

      `Library.Handler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Winspool` | `INSTANCE`
    `static int` | `PRINTER_ENUM_CONNECTIONS`
    `static int` | `PRINTER_ENUM_CONTAINER`
    `static int` | `PRINTER_ENUM_DEFAULT`
    `static int` | `PRINTER_ENUM_EXPAND`
    `static int` | `PRINTER_ENUM_FAVORITE`
    `static int` | `PRINTER_ENUM_HIDE`
    `static int` | `PRINTER_ENUM_ICON1`
    `static int` | `PRINTER_ENUM_ICON2`
    `static int` | `PRINTER_ENUM_ICON3`
    `static int` | `PRINTER_ENUM_ICON4`
    `static int` | `PRINTER_ENUM_ICON5`
    `static int` | `PRINTER_ENUM_ICON6`
    `static int` | `PRINTER_ENUM_ICON7`
    `static int` | `PRINTER_ENUM_ICON8`
    `static int` | `PRINTER_ENUM_ICONMASK`
    `static int` | `PRINTER_ENUM_LOCAL`
    `static int` | `PRINTER_ENUM_NAME`
    `static int` | `PRINTER_ENUM_NETWORK`
    `static int` | `PRINTER_ENUM_REMOTE`
    `static int` | `PRINTER_ENUM_SHARED`

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

      `FUNCTION_MAPPER, STDCALL_CONVENTION`

    - ### 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_TYPE_MAPPER`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `EnumPrinters(int Flags, java.lang.String Name, int Level, Pointer pPrinterEnum, int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned)` The EnumPrinters function enumerates available printers, print servers, domains, or print providers.

- - ### Field Detail

    - #### INSTANCE

          static final Winspool INSTANCE

    - #### 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

  - ### Method Detail

    - #### EnumPrinters

          boolean EnumPrinters(int Flags,
                             java.lang.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.

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