r5sdk/r5dev/thirdparty/cppnet/cppkore/ProcessStartInfo.h

45 lines
1.2 KiB
C
Raw Normal View History

2022-05-21 19:58:09 +02:00
#pragma once
#include "StringBase.h"
namespace Diagnostics
{
enum class ProcessWindowStyle
{
Normal,
Hidden,
Minimized,
Maximized
};
// Information used when starting a new process
struct ProcessStartInfo
{
// Sets the application, document, or URL that is to be launched.
String FileName;
2022-05-21 19:58:09 +02:00
// Specifies the set of command line arguments to use when starting the application.
String Arguments;
2022-05-21 19:58:09 +02:00
// Sets the initial directory for the process that is started.
String WorkingDirectory;
2022-05-21 19:58:09 +02:00
// Specifies the verb to use when opening the filename.
String Verb;
2022-05-21 19:58:09 +02:00
// Whether or not to allow window creation.
bool CreateNoWindow;
// Whether to use ShellExecute vs CreateProcess.
bool UseShellExecute;
// Sets the style of window that should be used for the newly created process.
ProcessWindowStyle WindowStyle;
ProcessStartInfo(const String& FileName)
2022-05-21 19:58:09 +02:00
: FileName(FileName), UseShellExecute(true), CreateNoWindow(false), WindowStyle(ProcessWindowStyle::Normal)
{
}
ProcessStartInfo(const String& FileName, const String& Arguments)
2022-05-21 19:58:09 +02:00
: FileName(FileName), Arguments(Arguments), UseShellExecute(true), CreateNoWindow(false), WindowStyle(ProcessWindowStyle::Normal)
{
}
};
}