Class TargetController

Class Documentation

class TargetController

Public Functions

TargetController()
virtual ~TargetController()
virtual bool Launch(TargetLaunchProperties const &launchProperties) = 0

Launch a new target with injection of GPA shim.

See also

Errors(), Warnings(), InjectionResult())

Parameters

launchProperties -- Struct defining the launch properties, including data shared with the shim

Returns

True if launch succeeded, false otherwise (

virtual void WaitUntilComplete() = 0

Block until a target started with Launch exits or terminates.

See also

Code()

virtual void Terminate() = 0

Terminate a process previously started with Launch(). Process will be terminated with exit code 0.

virtual uint32_t Pid() const

Retrieve process ID for target previously started with Launch().

Returns

PID of launched process, or UINT32_MAX if launch failed or not yet performed.

virtual int32_t Code() const

Exit code of target launched with Launch().

Returns

Exit code of process if terminated, otherwise -1.

virtual InjectionResult Result() const

Query the result of target startup and injection via Launch()

See also

InjectionResult

Returns

One of InjectionResult enum defining the state of the launch-and-inject attempt after return of Launch().

virtual InjectionStatus Status() const

Query the current status of the target process.

See also

InjectionStatus

Returns

InjectionStatus value reflecting the current state of the target process.

virtual char const *const *Errors() const = 0

Query for any errors that occurred during target launch-and-inject.

Note

Warnings are fatal messages of abnormal launch/injection state.

Returns

NULL-terminated list of strings containing errors that occurred during launch/injection.

virtual char const *const *Warnings() const = 0

Query for any warnings that occurred during target launch-and-inject.

Note

Warnings are non-fatal messages of abnormal launch/injection state.

Returns

NULL-terminated list of strings containing warnings that occurred during launch/injection.

Public Static Functions

static TargetController *Create()

Create a platform-specific instance of TargetController interface.

Returns

Initialized and ready-to-use instance of TargetController interface.

static void Destroy(TargetController *controller)

Destroy an instance of TargetController previously created by Create().

See also

Create().

Parameters

controller -- Valid instance of TargetController

Protected Attributes

uint32_t mPid
int32_t mCode
InjectionResult mResult
InjectionStatus mStatus
system::Environment *mEnvironment