Public Member Functions | Public Attributes

IProcess Interface Reference

Abstract parent interface for processes handled by VirtualBox. More...

Inheritance diagram for IProcess:
IGuestProcess

List of all members.

Public Member Functions

void waitFor (in unsigned long waitFor, in unsigned long timeoutMS,[retval] out ProcessWaitResult reason)
 Waits for one more events to happen.
void waitForArray (in ProcessWaitForFlag[] waitFor, in unsigned long timeoutMS,[retval] out ProcessWaitResult reason)
 Waits for one more events to happen.
void read (in unsigned long handle, in unsigned long toRead, in unsigned long timeoutMS,[retval] out octet[] data)
 Reads data from a running process.
void write (in unsigned long handle, in unsigned long flags, in octet[] data, in unsigned long timeoutMS,[retval] out unsigned long written)
 Writes data to a running process.
void writeArray (in unsigned long handle, in ProcessInputFlag[] flags, in octet[] data, in unsigned long timeoutMS,[retval] out unsigned long written)
 Writes data to a running process.
void terminate ()
 Terminates (kills) a running process.

Public Attributes

readonly attribute wstring[] arguments
 The arguments this process is using for execution.
readonly attribute wstring[] environment
 The environment block this process is using during execution.
readonly attribute IEventSource eventSource
 Event source for VirtualBox events.
readonly attribute wstring executablePath
 Full path of the actual executable image.
readonly attribute long exitCode
 The exit code.
readonly attribute wstring name
 The friendly name of this process.
readonly attribute unsigned long PID
 The process ID (PID).
readonly attribute ProcessStatus status
 The current process status; see ProcessStatus for more information.

Detailed Description

Abstract parent interface for processes handled by VirtualBox.

Interface ID:
{5A4FE06D-8CB1-40FF-AC9E-9676E32F706E}

Member Function Documentation

void IProcess::waitFor ( in unsigned long  waitFor,
in unsigned long  timeoutMS,
[retval] out ProcessWaitResult  reason 
)

Waits for one more events to happen.

Parameters:
waitFor Specifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
reason The overall wait result; see ProcessWaitResult for more information.
void IProcess::waitForArray ( in ProcessWaitForFlag[]  waitFor,
in unsigned long  timeoutMS,
[retval] out ProcessWaitResult  reason 
)

Waits for one more events to happen.

Scriptable version of waitFor.

Parameters:
waitFor Specifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
reason The overall wait result; see ProcessWaitResult for more information.
void IProcess::read ( in unsigned long  handle,
in unsigned long  toRead,
in unsigned long  timeoutMS,
[retval] out octet[]  data 
)

Reads data from a running process.

Parameters:
handle Handle to read from. Usually 0 is stdin.
toRead Number of bytes to read.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
data Array of data read.
void IProcess::write ( in unsigned long  handle,
in unsigned long  flags,
in octet[]  data,
in unsigned long  timeoutMS,
[retval] out unsigned long  written 
)

Writes data to a running process.

Parameters:
handle Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flags A combination of ProcessInputFlag flags.
data Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
written How much bytes were written.
void IProcess::writeArray ( in unsigned long  handle,
in ProcessInputFlag[]  flags,
in octet[]  data,
in unsigned long  timeoutMS,
[retval] out unsigned long  written 
)

Writes data to a running process.

Scriptable version of write.

Parameters:
handle Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flags A combination of ProcessInputFlag flags.
data Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
written How much bytes were written.
void IProcess::terminate (  ) 

Terminates (kills) a running process.

Note:
It can take up to 30 seconds to get a guest process killed. In case a guest process could not be killed an appropriate error is returned.

Member Data Documentation

readonly attribute wstring [] IProcess::arguments

The arguments this process is using for execution.

readonly attribute wstring [] IProcess::environment

The environment block this process is using during execution.

readonly attribute IEventSource IProcess::eventSource

Event source for VirtualBox events.

readonly attribute wstring IProcess::executablePath

Full path of the actual executable image.

readonly attribute long IProcess::exitCode

The exit code.

Only available when the process has been terminated normally.

readonly attribute wstring IProcess::name

The friendly name of this process.

readonly attribute unsigned long IProcess::PID

The process ID (PID).

readonly attribute ProcessStatus IProcess::status

The current process status; see ProcessStatus for more information.