IDkmExceptionManager.AddExceptionTrigger Method

Definition

Adds an exception trigger so that ExceptionTriggerHit events will be sent when the exception trigger has been met.

If there is already an exception triggered defined for this {SourceId, DkmExceptionTrigger} tuple then the existing trigger will be modified with the new settings. For example, if a component defines a trigger to stop when an access violation exception is thrown and later sets a trigger to fire when any Win32 exception goes unhandled, then the access violation trigger will be removed.

public:
 void AddExceptionTrigger(Microsoft::VisualStudio::Debugger::DkmProcess ^ process, Guid sourceId, Microsoft::VisualStudio::Debugger::Exceptions::DkmExceptionTrigger ^ trigger);
public void AddExceptionTrigger (Microsoft.VisualStudio.Debugger.DkmProcess process, Guid sourceId, Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger trigger);
abstract member AddExceptionTrigger : Microsoft.VisualStudio.Debugger.DkmProcess * Guid * Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger -> unit
Public Sub AddExceptionTrigger (process As DkmProcess, sourceId As Guid, trigger As DkmExceptionTrigger)

Parameters

process
DkmProcess

[In] 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.

sourceId
Guid

[In] 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).

trigger
DkmExceptionTrigger

[In] Describes an exception or collection of exceptions which a component wants to break on. When a higher level components wants to be notified about certain exceptions, it should create one or more exception triggers, and then enable these triggers (DkmProcess.EnableExceptionTriggers). After this, when the exception occurs, a ExceptionTriggerHit exception will be fired whenever this trigger is met.

Applies to