com.sun.jna.platform.win32

## Class WinBase.STARTUPINFO

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.WinBase.STARTUPINFO

- Enclosing interface:
    WinBase

      public static class WinBase.STARTUPINFO
      extends Structure

  Specifies the window station, desktop, standard handles, and appearance of the main window for a process at creation time.

- - ### 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
    --- | ---
    `WinDef.DWORD` | `cb` The size of the structure, in bytes.
    `WinDef.WORD` | `cbReserved2` Reserved for use by the C Run-time; must be zero.
    `WinDef.DWORD` | `dwFillAttribute` If dwFlags specifies STARTF_USEFILLATTRIBUTE, this member is the initial text and background colors if a new console window is created in a console application.
    `int` | `dwFlags` A bit field that determines whether certain STARTUPINFO members are used when the process creates a window.
    `WinDef.DWORD` | `dwX` If dwFlags specifies STARTF_USEPOSITION, this member is the x offset of the upper left corner of a window if a new window is created, in pixels.
    `WinDef.DWORD` | `dwXCountChars` If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer width, in character columns.
    `WinDef.DWORD` | `dwXSize` If dwFlags specifies STARTF_USESIZE, this member is the width of the window if a new window is created, in pixels.
    `WinDef.DWORD` | `dwY` If dwFlags specifies STARTF_USEPOSITION, this member is the y offset of the upper left corner of a window if a new window is created, in pixels.
    `WinDef.DWORD` | `dwYCountChars` If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer height, in character rows.
    `WinDef.DWORD` | `dwYSize` If dwFlags specifies STARTF_USESIZE, this member is the height of the window if a new window is created, in pixels.
    `WinNT.HANDLE` | `hStdError` If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard error handle for the process.
    `WinNT.HANDLE` | `hStdInput` If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard input handle for the process.
    `WinNT.HANDLE` | `hStdOutput` If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard output handle for the process.
    `java.lang.String` | `lpDesktop` The name of the desktop, or the name of both the desktop and window station for this process.
    `java.lang.String` | `lpReserved` Reserved; must be NULL.
    `ByteByReference` | `lpReserved2` Reserved for use by the C Run-time; must be NULL.
    `java.lang.String` | `lpTitle` For console processes, this is the title displayed in the title bar if a new console window is created.
    `WinDef.WORD` | `wShowWindow` If dwFlags specifies STARTF_USESHOWWINDOW, this member can be any of the values that can be specified in the nCmdShow parameter for the ShowWindow function, except for SW_SHOWDEFAULT.

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

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `STARTUPINFO()`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.

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

    - #### cb

          public WinDef.DWORD cb

      The size of the structure, in bytes.

    - #### lpReserved

          public java.lang.String lpReserved

      Reserved; must be NULL.

    - #### lpDesktop

          public java.lang.String lpDesktop

      The name of the desktop, or the name of both the desktop and window station for this process. A backslash in the string indicates that the string includes both the desktop and window station names. For more information, see Thread Connection to a Desktop.

    - #### lpTitle

          public java.lang.String lpTitle

      For console processes, this is the title displayed in the title bar if a new console window is created. If NULL, the name of the executable file is used as the window title instead. This parameter must be NULL for GUI or console processes that do not create a new console window.

    - #### dwX

          public WinDef.DWORD dwX

      If dwFlags specifies STARTF_USEPOSITION, this member is the x offset of the upper left corner of a window if a new window is created, in pixels. Otherwise, this member is ignored. The offset is from the upper left corner of the screen. For GUI processes, the specified position is used the first time the new process calls CreateWindow to create an overlapped window if the x parameter of CreateWindow is CW_USEDEFAULT.

    - #### dwY

          public WinDef.DWORD dwY

      If dwFlags specifies STARTF_USEPOSITION, this member is the y offset of the upper left corner of a window if a new window is created, in pixels. Otherwise, this member is ignored. The offset is from the upper left corner of the screen. For GUI processes, the specified position is used the first time the new process calls CreateWindow to create an overlapped window if the y parameter of CreateWindow is CW_USEDEFAULT.

    - #### dwXSize

          public WinDef.DWORD dwXSize

      If dwFlags specifies STARTF_USESIZE, this member is the width of the window if a new window is created, in pixels. Otherwise, this member is ignored. For GUI processes, this is used only the first time the new process calls CreateWindow to create an overlapped window if the nWidth parameter of CreateWindow is CW_USEDEFAULT.

    - #### dwYSize

          public WinDef.DWORD dwYSize

      If dwFlags specifies STARTF_USESIZE, this member is the height of the window if a new window is created, in pixels. Otherwise, this member is ignored. For GUI processes, this is used only the first time the new process calls CreateWindow to create an overlapped window if the nHeight parameter of CreateWindow is CW_USEDEFAULT.

    - #### dwXCountChars

          public WinDef.DWORD dwXCountChars

      If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer width, in character columns. Otherwise, this member is ignored.

    - #### dwYCountChars

          public WinDef.DWORD dwYCountChars

      If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer height, in character rows. Otherwise, this member is ignored.

    - #### dwFillAttribute

          public WinDef.DWORD dwFillAttribute

      If dwFlags specifies STARTF_USEFILLATTRIBUTE, this member is the initial text and background colors if a new console window is created in a console application. Otherwise, this member is ignored. This value can be any combination of the following values: FOREGROUND_BLUE, FOREGROUND_GREEN, FOREGROUND_RED, FOREGROUND_INTENSITY, BACKGROUND_BLUE, BACKGROUND_GREEN, BACKGROUND_RED, and BACKGROUND_INTENSITY. For example, the following combination of values produces red text on a white background: FOREGROUND_RED| BACKGROUND_RED| BACKGROUND_GREEN| BACKGROUND_BLUE

    - #### dwFlags

          public int dwFlags

      A bit field that determines whether certain STARTUPINFO members are used when the process creates a window.

    - #### wShowWindow

          public WinDef.WORD wShowWindow

      If dwFlags specifies STARTF_USESHOWWINDOW, this member can be any of the values that can be specified in the nCmdShow parameter for the ShowWindow function, except for SW_SHOWDEFAULT. Otherwise, this member is ignored. For GUI processes, the first time ShowWindow is called, its nCmdShow parameter is ignored wShowWindow specifies the default value. In subsequent calls to ShowWindow, the wShowWindow member is used if the nCmdShow parameter of ShowWindow is set to SW_SHOWDEFAULT.

    - #### cbReserved2

          public WinDef.WORD cbReserved2

      Reserved for use by the C Run-time; must be zero.

    - #### lpReserved2

          public ByteByReference lpReserved2

      Reserved for use by the C Run-time; must be NULL.

    - #### hStdInput

          public WinNT.HANDLE hStdInput

      If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard input handle for the process. If STARTF_USESTDHANDLES is not specified, the default for standard input is the keyboard buffer. If dwFlags specifies STARTF_USEHOTKEY, this member specifies a hotkey value that is sent as the wParam parameter of a WM_SETHOTKEY message to the first eligible top-level window created by the application that owns the process. If the window is created with the WS_POPUP window style, it is not eligible unless the WS_EX_APPWINDOW extended window style is also set. For more information, see CreateWindowEx. Otherwise, this member is ignored.

    - #### hStdOutput

          public WinNT.HANDLE hStdOutput

      If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard output handle for the process. Otherwise, this member is ignored and the default for standard output is the console window's buffer.

    - #### hStdError

          public WinNT.HANDLE hStdError

      If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard error handle for the process. Otherwise, this member is ignored and the default for standard error is the console window's buffer.

  - ### Constructor Detail

    - #### STARTUPINFO

          public STARTUPINFO()

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

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