STARTUPINFO (Structures)
Last changed: dahall-72.24.140.51

.
Summary
Used with CreateProcess, CreateProcessAsUser, and CreateProcessWithLogonW to specify the window station, desktop, standard handles, and appearance of the main window for the new process.

C# Definition:

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

struct STARTUPINFO

{

     Int32 cb;

     string lpReserved;
     string lpDesktop;
     string lpTitle;
     Int32 dwX;
     Int32 dwY;
     Int32 dwXSize;
     Int32 dwYSize;
     Int32 dwXCountChars;
     Int32 dwYCountChars;
     Int32 dwFillAttribute;
     Int32 dwFlags;
     Int16 wShowWindow;
     Int16 cbReserved2;
     IntPtr lpReserved2;
     IntPtr hStdInput;
     IntPtr hStdOutput;
     IntPtr hStdError;

}

VB Definition:

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Structure STARTUPINFO
   Public cb As Integer
   Public lpReserved As String
   Public lpDesktop As String
   Public lpTitle As String
   Public dwX As Integer
   Public dwY As Integer
   Public dwXSize As Integer
   Public dwYSize As Integer
   Public dwXCountChars As Integer
   Public dwYCountChars As Integer
   Public dwFillAttribute As Integer
   Public dwFlags As Integer
   Public wShowWindow As Short
   Public cbReserved2 As Short
   Public lpReserved2 As Integer
   Public hStdInput As Integer
   Public hStdOutput As Integer
   Public hStdError As Integer
End Structure

Notes:

None.

Tips & Tricks:

When using this structure, one should be careful to call the GetStartupInfoW function, to make sure the returning string is in Unicode.

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
STARTUPINFO on MSDN