DkmDeploymentCommand Class

Definition

Object representing an arbitrary executable which is executed on the target computer.

public ref class DkmDeploymentCommand : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("301484b2-442b-a6f7-f258-48db3d9d121a")]
public class DkmDeploymentCommand : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("301484b2-442b-a6f7-f258-48db3d9d121a")>]
type DkmDeploymentCommand = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmDeploymentCommand
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmDeploymentCommand
Attributes
Implements

Properties

Arguments

[Optional] Arguments to pass to the remote command. This value may be null to pass no arguments.

Connection

Transport connection to the target where the command should execute.

CurrentDirectory

[Optional] Initial current directory for the target process. This value may be null to use the directory of the remote debugger.

Flags

Flags effecting the processing of deployment commands.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
RemoteExecutable

Path to the remote executable. Environment variables will be expanded (ex: %TMP%\mycommand.exe). If this is not a full path, the remote debugger will look next to itself, and then search the PATH environment variable.

SourceId

Identifies the source of an object. SourceIds are used to enable filtering in scenarios when multiple components may be creating instances of a class. For example, source ids can be used to determine if a breakpoint comes from the AD7 AL (ex: user breakpoint, or other breakpoint visible at the SDM level) instead of a breakpoint which may be created by another component (for example an internal breakpoint used for stepping).

UniqueId

Guid which uniquely identifies this object.

Methods

Abort()

Abort execution of the command by terminating the launched process. If successful, this will cause IDkmDeploymentCommandCallback.OnProcessExit to be called.

Close()

Closes the deployment command object. This should be called by the creator of the DkmDeploymentCommand object after execution has completed (IDkmDeploymentCommandCallback.OnProcessExit is called).

DkmDeploymentCommand objects are automatically closed when their associated DkmTransportConnection object is closed.

This method may only be called by the component which created the object.

Create(DkmTransportConnection, Guid, String, String, String, DkmDeploymentCommandFlags, DkmDataItem)

Creates a new DkmDeploymentCommand object. The command will not begin executing until Start is called. The caller is responsible for closing the created object after they are done.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
OnProcessExit(Int32)

Indication that the launched command has completed. After this is received, no further notifications will be sent.

Location constraint: API must be called from a Monitor component (component level < 100,000).

OnStdErr(String)

Indication that the target wrote to stderr. This will not be used if the DkmDeploymentCommandFlags.CombineStdErr flag is used. Note that the output from stderr and stdout is not synchronized, so if a program writes to stdout before stderr, a listener may still get the stderr output first (or vice versa).

Location constraint: API must be called from a Monitor component (component level < 100,000).

OnStdOut(String)

Indication that the target wrote to stdout. This is also used for StdErr if the DkmDeploymentCommandFlags.CombineStdErr flag is used.

Location constraint: API must be called from a Monitor component (component level < 100,000).

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
Start()

Begin execution of the deployment command. This method will return once the deployed command has begun execution. Callers of this method would typically implement IDkmDeploymentCommandCallback with a SourceId filter to receive information about the command.

Explicit Interface Implementations

IDisposable.Dispose()

Applies to