OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::app Namespace Reference

Enumerations

enum  RunResult { OK , GeneralError }
 Describes the result of a run application request. More...
 

Functions

OT_SYS_API_EXPORT RunResult runApplication (const std::string &_applicationPath, bool _waitForResponse=true, unsigned long _waitTimeout=OT_INFINITE_TIMEOUT)
 Will start the application under the given application path.
 
OT_SYS_API_EXPORT RunResult runApplication (const std::wstring &_applicationPath, bool _waitForResponse=true, unsigned long _waitTimeout=OT_INFINITE_TIMEOUT)
 Will start the application under the given application path.
 
OT_SYS_API_EXPORT RunResult runApplication (const std::string &_applicationPath, const std::string &_commandLine, OT_PROCESS_HANDLE &_processHandle, bool _waitForResponse=true, unsigned long _waitTimeout=OT_INFINITE_TIMEOUT)
 Will start the application under the given application path with the given command line.
 
OT_SYS_API_EXPORT RunResult runApplication (const std::wstring &_applicationPath, const std::wstring &_commandLine, OT_PROCESS_HANDLE &_processHandle, bool _waitForResponse=true, unsigned long _waitTimeout=OT_INFINITE_TIMEOUT)
 Will start the application under the given application path with the given command line.
 
OT_SYS_API_EXPORT bool isApplicationRunning (OT_PROCESS_HANDLE &_processHandle)
 Returns true if the provided process is still alive.
 
OT_SYS_API_EXPORT std::string getCurrentExecutableDirectory (void)
 Will return a string containing the current directory where the current executable is located at.
 
OT_SYS_API_EXPORT std::wstring getCurrentExecutableDirectoryW (void)
 Will return a wide string containing the current directory where the current executable is located at.
 
OT_SYS_API_EXPORT std::string getCurrentExecutableFilePath (void)
 Will return a string containing the path of the current executable.
 
OT_SYS_API_EXPORT std::wstring getCurrentExecutableFilePathW (void)
 Will return a wide string containing the path of the current executable.
 

Enumeration Type Documentation

◆ RunResult

Describes the result of a run application request.

Enumerator
OK 
GeneralError 

Function Documentation

◆ getCurrentExecutableDirectory()

std::string ot::app::getCurrentExecutableDirectory ( void )

Will return a string containing the current directory where the current executable is located at.

◆ getCurrentExecutableDirectoryW()

std::wstring ot::app::getCurrentExecutableDirectoryW ( void )

Will return a wide string containing the current directory where the current executable is located at.

◆ getCurrentExecutableFilePath()

std::string ot::app::getCurrentExecutableFilePath ( void )

Will return a string containing the path of the current executable.

◆ getCurrentExecutableFilePathW()

std::wstring ot::app::getCurrentExecutableFilePathW ( void )

Will return a wide string containing the path of the current executable.

◆ isApplicationRunning()

OT_SYS_API_EXPORT bool ot::app::isApplicationRunning ( OT_PROCESS_HANDLE & _processHandle)

Returns true if the provided process is still alive.

◆ runApplication() [1/4]

ot::app::RunResult ot::app::runApplication ( const std::string & _applicationPath,
bool _waitForResponse = true,
unsigned long _waitTimeout = OT_INFINITE_TIMEOUT )

Will start the application under the given application path.

Parameters
_applicationPathThe path the application is located at.
_waitForResponseIf true, the function will wait until the process was successfully started.

◆ runApplication() [2/4]

ot::app::RunResult ot::app::runApplication ( const std::string & _applicationPath,
const std::string & _commandLine,
OT_PROCESS_HANDLE & _processHandle,
bool _waitForResponse = true,
unsigned long _waitTimeout = OT_INFINITE_TIMEOUT )

Will start the application under the given application path with the given command line.

Parameters
_applicationPathThe path the application is located at.
_commandLineThe command line that should be used to start the application.
_hProcessThe process handle will be written here.
_waitForResponseIf true, the function will wait until the process was successfully started.

◆ runApplication() [3/4]

ot::app::RunResult ot::app::runApplication ( const std::wstring & _applicationPath,
bool _waitForResponse = true,
unsigned long _waitTimeout = OT_INFINITE_TIMEOUT )

Will start the application under the given application path.

Parameters
_applicationPathThe path the application is located at.
_waitForResponseIf true, the function will wait until the process was successfully started.

◆ runApplication() [4/4]

OT_SYS_API_EXPORT RunResult ot::app::runApplication ( const std::wstring & _applicationPath,
const std::wstring & _commandLine,
OT_PROCESS_HANDLE & _processHandle,
bool _waitForResponse = true,
unsigned long _waitTimeout = OT_INFINITE_TIMEOUT )

Will start the application under the given application path with the given command line.

Parameters
_applicationPathThe path the application is located at.
_commandLineThe command line that should be used to start the application.
_hProcessThe process handle will be written here.
_waitForResponseIf true, the function will wait until the process was successfully started.