|
Nebula
|
#include <win32process.h>
Inherits Base::Process.
Public Member Functions | |
| Win32Process () | |
| constructor | |
| bool | LaunchWait () const |
| launch application and wait for its termination | |
| bool | Launch () |
| launch application (returns immediately) | |
| bool | IsRunning () |
| Gets the state of application. Call this per frame. | |
| void | UpdateStdoutStream () |
| Read data from the captured stdout and writes it to the stream. | |
| bool | CheckIfExists () |
| Detect if an instance of the process is already running. | |
| Public Member Functions inherited from Base::Process | |
| Process () | |
| constructor | |
| void | SetExecutable (const IO::URI &uri) |
| set the executable path | |
| void | SetWorkingDirectory (const IO::URI &uri) |
| set working directory | |
| void | SetArguments (const Util::String &args) |
| set command line arguments | |
| void | SetNoConsoleWindow (bool b) |
| do not open a console window for the new process | |
| void | SetStdoutCaptureStream (const Ptr< IO::Stream > &stream) |
| set optional stdout capture stream | |
| const Ptr< IO::Stream > & | GetStdoutCaptureStream () const |
| get optional pointer to stdout capture stream | |
| void | SetStderrCaptureStream (const Ptr< IO::Stream > &stream) |
| set optional stderr capture stream | |
| const Ptr< IO::Stream > & | GetStderrCaptureStream () const |
| get optional pointer to stderr capture stream | |
Static Public Member Functions | |
| static bool | CheckIfExists (const IO::URI &program) |
| Detect if an instance of a given process is running. | |
Private Member Functions | |
| bool | LaunchWithoutOutputCapturing (DWORD creationFlags, const Util::String &cmdLine) const |
| launch without stdout capturing | |
| bool | LaunchWithOutputCapturing (DWORD creationFlags, const Util::String &cmdLine) const |
| launch with stdout capturing | |
| bool | CreateStdoutCapturePipe (PHANDLE stdoutRead, PHANDLE stdoutWrite) const |
| create pipe for optional stdout capturing | |
| void | CaptureOutput (HANDLE stdoutRead, HANDLE stderrRead, HANDLE childProcess) const |
| capture data from output | |
Private Attributes | |
| PROCESS_INFORMATION | lauchedProcessInfo |
| HANDLE | stdoutAsyncRead |
| HANDLE | stdoutAsyncWrite |
| HANDLE | stderrAsyncRead |
| HANDLE | stderrAsyncWrite |
| DWORD | numAsyncBytesRead |
| DWORD | numAsyncBytesAvailable |
| char | asyncBuffer [asyncBufferSize] |
Static Private Attributes | |
| static const int | asyncBufferSize = 4096 |
Additional Inherited Members | |
| Protected Attributes inherited from Base::Process | |
| bool | noConsoleWindow |
| bool | isRunning |
| IO::URI | exePath |
| IO::URI | workingDir |
| Util::String | args |
| Ptr< IO::Stream > | stdoutCaptureStream |
| Ptr< IO::Stream > | stderrCaptureStream |
| Win32::Win32Process::Win32Process | ( | ) |
constructor
|
private |
capture data from output
|
virtual |
Detect if an instance of the process is already running.
Implements Base::Process.
|
static |
Detect if an instance of a given process is running.
|
private |
create pipe for optional stdout capturing
|
virtual |
Gets the state of application. Call this per frame.
Gets the state of the application.
Implements Base::Process.
|
virtual |
launch application (returns immediately)
Launch the application process and returns immediately.
The state of the launched process can be checked by calling IsRunning().
Implements Base::Process.
|
virtual |
launch application and wait for its termination
Implements Base::Process.
|
private |
launch without stdout capturing
|
private |
launch with stdout capturing
|
virtual |
Read data from the captured stdout and writes it to the stream.
Reads all arrived data from stdout since the last call of this method and puts it to the stream.
Implements Base::Process.
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |