DkmTransportConnection Class

Definition

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.

Derived classes: DkmStandardRemoteTransportConnection

public ref class DkmTransportConnection : Microsoft::VisualStudio::Debugger::DkmDataContainer
[System.Runtime.InteropServices.Guid("37f756b6-9ea0-4c02-3f0a-99fb3a0f7a77")]
public class DkmTransportConnection : Microsoft.VisualStudio.Debugger.DkmDataContainer
[<System.Runtime.InteropServices.Guid("37f756b6-9ea0-4c02-3f0a-99fb3a0f7a77")>]
type DkmTransportConnection = class
    inherit DkmDataContainer
Public Class DkmTransportConnection
Inherits DkmDataContainer
Inheritance
DkmTransportConnection
Derived
Attributes

Properties

DebuggerCpuArchitecture
Flags

Flags indicating traits of the underlying connection.

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

Indicates the type of transport being used to debug.

ProtocolVersion

The version of the protocol used between Visual Studio and the target computer. This is the minimum of the protocol version that Visual Studio understands, and the protocol version that the remote debugger understands.

This API was introduced in Visual Studio 11 Update 1 (DkmApiVersion.VS11FeaturePack1).

Qualifier

[Optional] String indicating the connection destination. This will be null for the local connection. For default remote debugging, this is computer name and port number that we are trying to connect to.

UniqueId

Guid which uniquely identifies this connection. The local connection will use the value 'DkmTransportKind.Local'. The value for other connections will be randomly generated.

Methods

ActivateAppPackage(DkmWorkList, DkmPackagedAppPlatform, String, Boolean, DkmCompletionRoutine<DkmActivateAppPackageAsyncResult>)

Activates the specified packaged application. This will cause the application to start if it has not already started, and will bring it back as the active application if it is already running. When launching under the debugger, IDkmProcessLaunchNotifyListener.StartListener will be called before this API.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

ActivateAppPackageExtended(DkmWorkList, DkmPackagedAppPlatform, String, Boolean, DkmActivateAppPackageFlags, DkmCompletionRoutine<DkmActivateAppPackageAsyncResult>)

Activates the specified packaged application. This will cause the application to start if it has not already started, and will bring it back as the active application if it is already running. When launching under the debugger, IDkmProcessLaunchNotifyListener.StartListener will be called before this API.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

This API was introduced in Visual Studio 14 Update 1 (DkmApiVersion.VS14Update1).

ActivateAppPackageOnTargetMonitor(DkmWorkList, DkmPackagedAppPlatform, String, Boolean, UInt32, DkmCompletionRoutine<DkmActivateAppPackageAsyncResult>)

Activates a packaged application on the specified monitor. This will cause the application to start if it has not already started, and will bring it back as the active application if it is already running.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

This API was introduced in Visual Studio 12 Update 3 (DkmApiVersion.VS12Update3).

ActivateAppPackageWithStartupTask(DkmWorkList, String, Boolean, DkmCompletionRoutine<DkmActivateAppPackageAsyncResult>)

Activates the specified packaged application. This will cause the application to start if it has not already started, and will bring it back as the active application if it is already running. When launching under the debugger, IDkmProcessLaunchNotifyListener.StartListener will be called before this API.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

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

ActivateBackgroundTask(DkmWorkList, DkmAppPackageId, Int32, Guid, DkmCompletionRoutine<DkmActivateBackgroundTaskAsyncResult>)

Activate an background task. This is used by developers to test their app's activate handler.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

CreateCoreDumpParserTargetCompositionServices(String, Object)
CreateDirectory(String)

Creates a directory on the target computer. Note that directories are implicitly created when deploying files. So this API does not need to be used in that scenario.

DeleteFile(String)

Delete a file on the target computer.

DeployFile(String, String, Boolean)

Deploy a file to the target computer. Note that this will copy the file content and last write time, but not attributes.

Location constraint: API must be called from an IDE component (component level > 100,000).

DownloadFile(DkmWorkList, String, String, Boolean, DkmCompletionRoutine<DkmDownloadFileAsyncResult>)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

DownloadFile(String, String, Boolean)

Download a file from the target computer. Note that this will copy the file content and last write time, but not attributes.

Location constraint: API must be called from an IDE component (component level > 100,000).

EnumerateBackgroundTasks(DkmWorkList, DkmAppPackageId, Int32, DkmCompletionRoutine<DkmEnumerateBackgroundTasksAsyncResult>)

Enumerates the existing background tasks. This is used by developers to test their app's enum handler.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

EnumPackages()

Enumerates installed and launchable (App Packages with applications) App Packages.

Location constraint: API must be called from an IDE component (component level > 100,000).

EnumRunningProcesses(Boolean, DkmRunningProcessInfoPropertyMask)

Provides a listing of all the processes running on the target computer (including processes not being debugged).

EnumRunningProcesses(DkmWorkList, Boolean, DkmRunningProcessInfoPropertyMask, DkmCompletionRoutine<DkmEnumRunningProcessesAsyncResult>)
ExtractFromDeployConnection(IVsDebuggerDeployConnection)

Obtains the DkmTransportConnection object which backs the deploy connection. This can be used to bridge from the debugger deploy API, to the debugger engine (Dkm) APIs. As an example, this can be used to send DkmCustomMessages.

The caller must still hold onto deployConnection to avoid the underlying DkmTransportConnection from being disposed. Note that, by default, concord components will be unloaded during stop debugging. This behavior can be overwritten by setting 'StayLoadedForDeployConnection="true"' in the component's .vsdconfigxml file. This is useful if the caller wants to extract the deploy connection in order to send custom messages and wants to do so after the debugger session ended.

ExtractFromPort(IDebugPort2)

Obtains the DkmTransportConnection object which backs this port object. This will fail in remote debugging scenarios if the port is not currently connected, and reconnect was unsuccessful. This API will only function correctly from the main thread of Visual Studio.

FindConnection(Guid)

Find a DkmTransportConnection object. If no object with the given input key is present, FindConnection will fail.

FindLiveProcess(Int32)

Find a DkmProcess element within this DkmTransportConnection. If no element with the given input key is present, FindLiveProcess will fail. If an object is found, it will always contain the 'Live' Part.

FindProcess(Guid)

Find a DkmProcess element within this DkmTransportConnection. If no element with the given input key is present, FindProcess will fail.

FindProductionConnection(Guid)

Find a DkmProductionConnection element within this DkmTransportConnection. If no element with the given input key is present, FindProductionConnection will fail.

This API was introduced in Visual Studio 15 Update 2 (DkmApiVersion.VS15Update2).

FindRecordedProcessInfo(String)

Find a DkmRecordedProcessInfo element within this DkmTransportConnection. If no element with the given input key is present, FindRecordedProcessInfo will fail.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

FindSerializedProcessInfo(String)
FlushClosedObjectQueue()

This function is used to force all object close notifications to be immediately exchanged with the monitor process. Like 'GC.Collect' in managed code, this function is normally unnecessary, as the system automatically flushes the queue. However, this method can be used if it is important that all updates are immediately exchanged.

An object close notification is created (and queued) when a component calls 'Close' on a given object. Both the monitor process and the engine process maintain a queue of closed objects. This method may only be called from the engine process, but it is used to flush both queues.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetAppPackageExecutionState(DkmAppPackageId, Int32)

Get the execution state of the Windows Store app. The values in this field are specified in PACKAGE_EXECUTION_STATE.

GetClrVersionOfExecutable(String)

Provides the version string for the CLR that the debugger expects a given executable to load. The return value is based on the content of the executable's PE header (if the exe is managed), the executable's config file, CLR environment variables, and loader policy in the registry. The return value may be incorrect, especially in the case of a native executable.

GetConnections()

GetConnections enumerates all the created DkmTransportConnection objects.

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

Returns the version of the CLR which is loaded in the monitor process.

GetDNSName()

Provides the physical DNS host name that the target computer uses.

GetFileListing(String, String, Boolean)

Obtains a listing of files and subdirectories that exist on the target computer.

GetIsolatedStorageRootForApplication(DkmAppPackageId)

Obtain the full path to the isolated storage root directory for the specified application.

This API is not yet implemented for Windows Store apps, but is reserved for future use.

GetLiveProcesses()

GetLiveProcesses enumerates the DkmProcess elements of this DkmTransportConnectionobject. All objects contain the 'Live' Part.

GetProcesses()

GetProcesses enumerates the DkmProcess elements of this DkmTransportConnection object.

GetProductionConnections()

GetProductionConnections enumerates the DkmProductionConnection elements of this DkmTransportConnection object.

This API was introduced in Visual Studio 15 Update 2 (DkmApiVersion.VS15Update2).

GetRecordedProcesses()

GetRecordedProcesses enumerates the DkmRecordedProcessInfo elements of this DkmTransportConnection object.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

GetRecordedProcessInfo(String)

Obtain information about a recorded file.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

GetRequests()

GetRequests enumerates the DkmProcessLaunchRequest elements of this DkmTransportConnection object.

GetRunningProcessInfo(Int32, Int64, Boolean, DkmRunningProcessInfoPropertyMask)

Obtain information about a process running on the target computer.

GetSerializedProcessInfo(String)
GetSerializedProcessInformation()
GetSystemInformation(Boolean)

Provides information about the computer where the debug monitor is running.

QueryExecutableArchitecture(String)

Gets the architecture of the executable.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

QueryIsWOW64Executable(String)

Deprecated. Use QueryExecutableArchitecture. Determines if the given executable file will execute within WOW64 (Windows On Windows), which is used to execute 32-bit processes on a 64-bit OS.

RemoveAppPackageFromTaskbar(DkmAppPackageId, UInt32)

Removes an immersive app icon from the taskbar by closing it.

This API was introduced in Visual Studio 12 Update 3 (DkmApiVersion.VS12Update3).

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)
RemoveDirectory(String, Boolean)

Removes a directory on the target computer.

ResumeAppPackage(DkmAppPackageId, Int32)

Performs a simulated process lifetime management-based resume on the specified application. This is used by developers to test their app's resume handler.

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
ShutDownAppPackage(DkmWorkList, DkmAppPackageId, Int32, DkmCompletionRoutine<DkmShutDownAppPackageAsyncResult>)

Suspend and then shut down the specified application using the process lifetime management services. Using this followed by a second app launch, developers can test their app's ability to restart from suspended state.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

SuspendAppPackage(DkmWorkList, DkmAppPackageId, Int32, DkmCompletionRoutine<DkmSuspendAppPackageAsyncResult>)

Performs a simulated process lifetime management-based suspend on the specified application. This is used by developers to test their app's suspend handler.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

TerminateAppPackage(DkmWorkList, DkmAppPackageId, Int32, DkmCompletionRoutine<DkmTerminateAppPackageAsyncResult>)
TerminateRunningProcess(Int32, Int64, Int32)

Terminates a process running on target computer which is not being debugged.

TriggerPrefetch(String, DkmPackagedAppPlatform)

Triggers application content prefetch.

This API was introduced in Visual Studio 12 Update 2 (DkmApiVersion.VS12Update2).

Applies to