DkmProcessLaunchRequest Class

Definition

DkmProcessLaunchRequest is used to describe the process that debugger should launch.

public ref class DkmProcessLaunchRequest : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("7107fc56-3477-2708-fc00-174f33c04b08")]
public class DkmProcessLaunchRequest : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("7107fc56-3477-2708-fc00-174f33c04b08")>]
type DkmProcessLaunchRequest = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmProcessLaunchRequest
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmProcessLaunchRequest
Attributes
Implements

Properties

Arguments

[Optional] Arguments to pass to the executable file on the command line.

Connection

This represents a connection between the monitor and the IDE. It can either be a local connection if the monitor is running in the same process as the IDE, or it can be a remote connection. In the monitor process, there is only one connection.

DebugLaunchSettings

Settings supplied during a start debugging operation from a project system or other caller of LaunchDebugTargets (or various other start debugging APIs).

EngineSettings

[Optional] Settings to use when launching this executable under the debugger. This may be omitted if the process is not being launched under the debugger (ex: Ctrl-F5).

Environment

[Optional] A pointer to the environment block for the new process. If this parameter is NULL, the new process uses the environment of the calling process.

An environment block consists of a null-terminated block of null-terminated strings. Each string is in the following form: 'name=value\0'. Because the equal sign is used as a separator, it must not be used in the name of an environment variable.

FileName

Path to the executable file to launch.

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)
LaunchFlags

Flags associated with a request to launch a process.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

ModeFlags

Flag traits of a DkmProcessLaunchRequest.

StartupInfo

[Optional] Additional information used to launch a new process. This information is contained within the 'STARTUPINFO' structure in Win32.

UniqueId

UniqueId uniquely identifies the launch request.

Win32Flags

Win32 process creation flags used when launching the process. For example, CREATE_NO_WINDOW (0x08000000) could be passed to disable the creation of the console window. The following flags should never be passed, and the behavior is undefined if they are present: DEBUG_PROCESS, DEBUG_ONLY_THIS_PROCESS, CREATE_SUSPENDED, EXTENDED_STARTUPINFO_PRESENT, CREATE_SEPARATE_WOW_VDM, CREATE_SHARED_WOW_VDM, and CREATE_UNICODE_ENVIRONMENT.

WorkingDirectory

The full path to the current directory for the process. The string can also specify a UNC path.

Methods

Close()

Closes a DkmProcessLaunchRequest object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmProcessLaunchRequest 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(String, String, String, String, DkmProcessStartupInfo, DkmProcessLaunchModeFlags, Int32, DkmTransportConnection, DkmEngineSettings, DkmDebugLaunchSettings, DkmDataItem)

Create a new DkmProcessLaunchRequest object instance. The caller is responsible for closing the created object after they are done.

Create(String, String, String, String, DkmProcessStartupInfo, DkmProcessLaunchModeFlags, Int32, DkmTransportConnection, DkmEngineSettings, DkmDebugLaunchSettings, DkmProcessLaunchFlags, DkmDataItem)

Create a new DkmProcessLaunchRequest object instance. The caller is responsible for closing the created object after they are done.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

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)
LaunchDebuggedProcess()

Causes the debug monitor to create a new process under the debugger. The process should be left suspended until ResumeDebuggedProcess is called. The debug monitor must wait for ResumeDebuggedProcess before creating the DkmProcess object since it needs the UniqueProcessId value from the AD7 Layer.

Note that this method may only be called in response to the Visual Studio debugger package requesting a launch. Components that wish to launch another process under the debugger should send a custom event to a visual studio package. From a package, a launch can be requested through the IVsDebugger.LaunchDebugTargets API.

LaunchDebuggedProcess(DkmWorkList, DkmCompletionRoutine<DkmLaunchProcessAsyncResult>)
LaunchProcess()
LaunchProcess(DkmWorkList, DkmCompletionRoutine<DkmLaunchNonDebugProcessAsyncResult>)
LaunchProcess(DkmWorkList, Int32, DkmCompletionRoutine<DkmLaunchProcessAsyncResult>)
LaunchProcess(Int32)

This API is remote-able version of the Win32 CreateProcess API. The implementation will merge the environment block, process command line redirection and launch the process. Unless the NoDebug flag is used, CreateProcess will use the DEBUG_PROCESS flag when creating the Win32 process.

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)
ResumeDebuggedProcess(Guid)

Causes the debug monitor to resume a launched process and create the DkmProcess object. The DkmProcess object will be created on the event thread and creating the object will send a process create event.

Note that this method may only be called in response to the Visual Studio debugger package requesting a launch. Components that wish to launch another process under the debugger should send a custom event to a visual studio package. From a package, a launch can be requested through the IVsDebugger.LaunchDebugTargets API.

ResumeProcess()

This API is used to resume a process which was launched from CreateProcess with the LaunchSuspended flag set to true.

ResumeProcess(DkmProcess)

This API is used to resume a process which was launched from CreateProcess with the LaunchSuspended flag set to true.

This API was introduced in Visual Studio 15 Update 3 (DkmApiVersion.VS15Update3).

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)

Explicit Interface Implementations

IDisposable.Dispose()

To be added.

Applies to