Specifies the window station, desktop, standard handles, and appearance of the main window for a process at creation time.
- cb
The size of the structure, in bytes.
- lpReserved
Reserved; must be NULL.
- 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
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
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
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
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
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
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
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
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
A bit field that determines whether certain
STARTUPINFO members are used when the process creates a window. This member can be one or more of the following values.
| Value | Meaning |
- STARTF_FORCEONFEEDBACK
- 0x00000040
| Indicates that the cursor is in feedback mode for two seconds after
CreateProcess is called. The Working in Background cursor is displayed (see the Pointers tab in the Mouse control panel utility).
If during those two seconds the process makes the first GUI call, the system gives five more seconds to the process. If during those five seconds the process shows a window, the system gives five more seconds to the process to finish drawing the window.
The system turns the feedback cursor off after the first call to
GetMessage, regardless of whether the process is drawing.
|
- STARTF_FORCEOFFFEEDBACK
- 0x00000080
| Indicates that the feedback cursor is forced off while the process is starting. The Normal Select cursor is displayed.
|
- STARTF_PREVENTPINNING
- 0x00002000
| Indicates that any windows created by the process cannot be pinned on the taskbar.
|
- STARTF_RUNFULLSCREEN
- 0x00000020
| Indicates that the process should be run in full-screen mode, rather than in windowed mode.
This flag is only valid for console applications running on an x86 computer.
|
- STARTF_TITLEISAPPID
- 0x00001000
| The lpTitle member contains an AppUserModelID. This identifier controls how the taskbar and Start menu present the application, and enables it to be associated with the correct shortcuts and Jump Lists. Generally, applications will use the SetCurrentProcessExplicitAppUserModelID and GetCurrentProcessExplicitAppUserModelID functions instead of setting this flag. For more information, see Application User Model IDs.
This flag cannot be used with STARTF_TITLEISLINKNAME.
|
- STARTF_TITLEISLINKNAME
- 0x00002000
| The lpTitle member contains the path of the shortcut file (.lnk) that the user invoked to start this process. This is typically set by the shell when a .lnk file pointing to the launched application is invoked. Most applications will not need to set this value.
This flag cannot be used with STARTF_TITLEISAPPID.
|
- STARTF_USECOUNTCHARS
- 0x00000008
| The dwXCountChars and dwYCountChars members are valid.
|
- STARTF_USEFILLATTRIBUTE
- 0x00000010
| The dwFillAttribute member is valid.
|
- STARTF_USEPOSITION
- 0x00000004
| The dwX and dwY members are valid.
|
- STARTF_USESHOWWINDOW
- 0x00000001
| The wShowWindow member is valid.
|
- STARTF_USESIZE
- 0x00000002
| The dwXSize and dwYSize members are valid.
|
- STARTF_USESTDHANDLES
- 0x00000100
| The hStdInput, hStdOutput, and hStdError members are valid.
If this flag is specified when calling one of the process creation functions, the handles must be inheritable and the
function's bInheritHandles parameter must be set to TRUE. For more information, see
Handle Inheritance.
If this flag is specified when calling the GetStartupInfo function, these members are either the handle value specified during process creation or INVALID_HANDLE_VALUE.
|
- 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
Reserved for use by the C Run-time; must be zero.
- lpReserved2
Reserved for use by the C Run-time; must be NULL.
- hStdInput
If dwFlags specifies STARTF_USESTDHANDLES, this member is the standard input handle for the process. Otherwise, this member is ignored and the default for standard input is the keyboard buffer.
- 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
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.
For graphical user interface (GUI) processes, this information affects the first window created by the
CreateWindow function and shown by the
ShowWindow function. For console processes, this information affects the console window if a new console is created for the process. A process can use the
GetStartupInfo function to retrieve the
STARTUPINFO structure specified when the process was created.
If a GUI process is being started and neither STARTF_FORCEONFEEDBACK or STARTF_FORCEOFFFEEDBACK is specified, the process feedback cursor is used. A GUI process is one whose subsystem is specified as "windows."