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. More...
 
void waitForArray (in ProcessWaitForFlag[] waitFor, in unsigned long timeoutMS, [retval] out ProcessWaitResult reason)
 Waits for one or more events to happen. More...
 
void read (in unsigned long handle, in unsigned long toRead, in unsigned long timeoutMS, [retval] out octet[] data)
 Reads data from a running process. More...
 
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. More...
 
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. More...
 
void terminate ()
 Terminates (kills) a running process. More...
 

Public Attributes

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

Detailed Description

Abstract parent interface for processes handled by VirtualBox.

Interface ID:
{2E20707D-4325-9A83-83CF-3FAF5B97457C}

Member Function Documentation

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.
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.
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.
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 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
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 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 initial process environment.

Not yet implemented.

readonly attribute IEventSource IProcess::eventSource

Event source for process 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.