DkmProcessAttachRequest.AttachToProcess Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Causes the debug monitor to attach to the process. Before this method returns, the debug monitor must start an event thread (or reuse an existing event thread) and create the DkmProcess object on the event thread. Creating the DkmProcess object will send a process create event.
Note that this method may only be called in response to the Visual Studio debugger package requesting an attach. Components that wish to attach to another process should send a custom event to a visual studio package. From a package, an attach can be requested through the IVsDebugger.LaunchDebugTargets API.
public:
Microsoft::VisualStudio::Debugger::DkmProcess ^ AttachToProcess();
public Microsoft.VisualStudio.Debugger.DkmProcess AttachToProcess ();
member this.AttachToProcess : unit -> Microsoft.VisualStudio.Debugger.DkmProcess
Public Function AttachToProcess () As DkmProcess
Returns
[Out] DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.
Exceptions
E_ATTACH_USER_CANCELED indicates that the attach to process operation was canceled. Returning this error will suppress most error messages. So it can be used in combination with DkmUserMessage.Post or DkmCustomMessage.SendToVsService as a way of providing custom failure messages to the user.