Partager via


IVsTextMarker.ExecMarkerCommand Method

Executes a text marker command against a marker.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Déclaration
Function ExecMarkerCommand ( _
    iItem As Integer _
) As Integer
'Utilisation
Dim instance As IVsTextMarker
Dim iItem As Integer
Dim returnValue As Integer

returnValue = instance.ExecMarkerCommand(iItem)
int ExecMarkerCommand(
    int iItem
)
int ExecMarkerCommand(
    [InAttribute] int iItem
)
abstract ExecMarkerCommand : 
        iItem:int -> int 
function ExecMarkerCommand(
    iItem : int
) : int

Parameters

  • iItem
    Type: System.Int32
    [in] Integer identifying the item number for a marker type's context menu command. Values typically range from 0 to 9, but the marker type may also support command values 101 through 103. For more information about these command values, see MarkerCommandValues2.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextMarker::ExecMarkerCommand(
   [in] long iItem
);

Each marker type provided with the core text editor has a list of context menu commands associated with the marker type. Use ExecMarkerCommand to execute one of these commands against the text marker. Use GetMarkerCommandInfo to return information, such as the display string, for each command.

.NET Framework Security

See Also

Reference

IVsTextMarker Interface

IVsTextMarker Members

Microsoft.VisualStudio.TextManager.Interop Namespace