VirtualBox Main API
Public Member Functions | Public Attributes | List of all members
IProcess Interface Reference

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

Inheritance diagram for IProcess:
IGuestProcess

Public Member Functions

void waitFor (in unsigned long waitFor, in unsigned long timeoutMS, [retval] out ProcessWaitResult reason)
 Waits for one or more events to happen.
 
void waitForArray (in ProcessWaitForFlag[] waitFor, in unsigned long timeoutMS, [retval] out ProcessWaitResult reason)
 Waits for one or 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 initial process environment.
 
readonly attribute IEventSource eventSource
 Event source for process 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:
{BC68370C-8A02-45F3-A07D-A67AA72756AA}

Member Function Documentation

◆ waitFor()

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

Waits for one or more events to happen.

Parameters
waitForSpecifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
reasonThe overall wait result; see ProcessWaitResult for more information.

◆ waitForArray()

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

Waits for one or more events to happen.

Scriptable version of waitFor.

Parameters
waitForSpecifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
reasonThe overall wait result; see ProcessWaitResult for more information.

◆ read()

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
handleHandle to read from. Usually 0 is stdin.
toReadNumber of bytes to read.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
dataArray of data read.

◆ write()

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
handleHandle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flagsA combination of ProcessInputFlag flags.
dataArray of bytes to write. The size of the array also specifies how much to write.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
writtenHow many bytes were written.

◆ writeArray()

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
handleHandle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flagsA combination of ProcessInputFlag flags.
dataArray of bytes to write. The size of the array also specifies how much to write.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
writtenHow may bytes were written.

◆ terminate()

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

◆ arguments

readonly attribute wstring [] IProcess::arguments

The arguments this process is using for execution.

◆ environment

readonly attribute wstring [] IProcess::environment

The initial process environment.

Not yet implemented.

◆ eventSource

readonly attribute IEventSource IProcess::eventSource

Event source for process events.

◆ executablePath

readonly attribute wstring IProcess::executablePath

Full path of the actual executable image.

◆ exitCode

readonly attribute long IProcess::exitCode

The exit code.

Only available when the process has been terminated normally.

◆ name

readonly attribute wstring IProcess::name

The friendly name of this process.

◆ PID

readonly attribute unsigned long IProcess::PID

The process ID (PID).

◆ status

readonly attribute ProcessStatus IProcess::status

The current process status; see ProcessStatus for more information.