Hooking Project

Information for starting a process.

License
Boost License 1.0.
Authors
Denis Shelomovskij

struct  ProcessStartInfo;

This struct encapsulates process starting information.


const @property bool  associated();

Returns whether ProcessStartInfo is associated with a file.

E.g. ProcessStartInfo.init is unassociated.


const @property bool  storedAsCommandLine();

Returns whether ProcessStartInfo is stored as a command line.

It is false for an unassociated ProcessStartInfo.


const @property string  commandLine();

Gets executable file & arguments as a command line.

Returns null if unassociated.

Note:
File path is always quoted.

@property void  commandLine(string value);

Sets executable file & arguments as command line.

Also sets storedAsCommandLine.

Note:
File path will be quoted if it isn't.
Preconditions:
value starts from a valid path.

const @property string  file();

Gets path to executable file.

Returns null if unassociated.


@property void  file(string value);

Sets path to executable file.

Also unsets storedAsCommandLine.

Preconditions:
value is a valid path.

const @property const(immutable(char)[])[]  arguments();

Gets arguments.

Returns null if unassociated.


@property void  arguments(string[] value);

Sets arguments.

Also unsets storedAsCommandLine.


inout @property ref inout(bool)  searchForFile();

Whether OS will search for executable file.

Note:
Be careful with this as it can lead to security vulnerability if used careless.

Default value is false.

inout @property ref inout(bool)  suspended();

Whether the primary thread will be created in a suspended state.

The primary thread of the new process will not run until it will be resumed.

Default value is false.


inout @property ref inout(bool)  createNewConsole();

Whether new console will be created.

If not set, parent's console will be inherited.

Default value is false.


this(string commandLine, bool searchForFile = false, bool suspended = false, bool createNewConsole = false);

Construct a ProcessStartInfo from a commandLine.


this(string file, string[] arguments, bool searchForFile = false, bool suspended = false, bool createNewConsole = false);

Construct a ProcessStartInfo from an executable file and arguments.