SystemProcessObjectInterface Class Reference

#include <system_process.h>

Inheritance diagram for SystemProcessObjectInterface:

详细描述

SystemProcessObjectInterface .

公共成员函数

MAXON_METHOD Result < void >  StartProcess ()
MAXON_METHOD Result < void >  KillProcess ()
MAXON_METHOD Int   GetExitCode () const
MAXON_METHOD Bool   IsRunning () const
MAXON_METHOD UInt   GetProcessId () const
MAXON_METHOD void *  GetProcessHandle () const
MAXON_METHOD Url   GetProcessUrl () const
MAXON_METHOD Url   GetLogFile () const
MAXON_METHOD void *  GetUserData () const
MAXON_METHOD Result < void >  GetLoadedDlls (const ValueReceiver < const DllRef & > &dlls) const
  MAXON_OBSERVABLE (void, ObservableProcessFinished,(const SystemProcessObjectRef &sender), ObservableCombinerRunAllComponent)

私有成员函数

  MAXON_INTERFACE ( SystemProcessObjectInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.systemprocessobject")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( SystemProcessObjectInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.systemprocessobject"   
)
private

◆  StartProcess()

MAXON_METHOD Result <void> StartProcess ( )

Executes the prepared process. This only works once. To start the same executable again you need to allocate another instance with the same settings.

返回
OK on success.

◆  KillProcess()

MAXON_METHOD Result <void> KillProcess ( )

Kills the process if it is still running. All child processes are also killed.

返回
OK on success. If the process was not running SystemProcessOperationError is returned.

◆  GetExitCode()

MAXON_METHOD Int GetExitCode ( ) const

Returns the exit code of the execution. This is possible as soon as the process finished. Note: The exit code under OS X only works for own child processes. Under Windows the exit code is available for all processes.

返回
Returns the exit code of the process or (UInt)NOTOK if the process is still running.

◆  IsRunning()

MAXON_METHOD Bool IsRunning ( ) const

Returns whether the process is running or not.

返回
True if the process is running.

◆  GetProcessId()

MAXON_METHOD UInt GetProcessId ( ) const

Returns the 系统 Process Id .

返回
The system process id (pid).

◆  GetProcessHandle()

MAXON_METHOD void* GetProcessHandle ( ) const

Returns the pointer to the windows process handle.

返回
Windows: HANDLE of the windows process. OS X: pid of the process.

◆  GetProcessUrl()

MAXON_METHOD Url GetProcessUrl ( ) const

Returns the file path to the executable. Notes: Under windows the full path is only returned for processes that the user owns. 系统 processes are only given by name. Under OS X the name is limited to the first 10 characters at the moment.

返回
File name of the executable.

◆  GetLogFile()

MAXON_METHOD Url GetLogFile ( ) const

Returns the path of the captured logfile.

返回
Return the log file path. If the process was not created using EXECUTEPROGRAMFLAGS::CAPTURELOGFILE an empty name is returned.

◆  GetUserData()

MAXON_METHOD void* GetUserData ( ) const

Returns the user data connected to this process. See SystemProcessInterface::CreateProcess() .

返回
Return the pointer to the user data of this process.

◆  GetLoadedDlls()

MAXON_METHOD Result <void> GetLoadedDlls ( const ValueReceiver < const DllRef & > &  dlls ) const

Gets an array of all loaded dlls for this process.

返回
OK on success.

◆  MAXON_OBSERVABLE()

MAXON_OBSERVABLE ( void  ,
ObservableProcessFinished  ,
(const SystemProcessObjectRef &sender)  ,
ObservableCombinerRunAllComponent   
)

Signal that the process finished execution. Make sure that you add this notification before you start the process, otherwise it could be too late if the process already ended.

参数
[in] sender Reference to the SystemProcessObjectRef which has been finished.
返回
ObservableRef to operate on.