HierarchyNode.ExecCommandIndependentOfSelection Method

Executes commands that do not depend on what is selected.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Protected Overridable Function ExecCommandIndependentOfSelection ( _
    guidCmdGroup As Guid, _
    cmdId As UInteger, _
    cmdExecOpt As UInteger, _
    vaIn As IntPtr, _
    vaOut As IntPtr, _
    commandOrigin As CommandOrigin, _
    <OutAttribute> ByRef handled As Boolean _
) As Integer
'使用
Dim guidCmdGroup As Guid
Dim cmdId As UInteger
Dim cmdExecOpt As UInteger
Dim vaIn As IntPtr
Dim vaOut As IntPtr
Dim commandOrigin As CommandOrigin
Dim handled As Boolean
Dim returnValue As Integer

returnValue = Me.ExecCommandIndependentOfSelection(guidCmdGroup, _
    cmdId, cmdExecOpt, vaIn, vaOut, commandOrigin, _
    handled)
protected virtual int ExecCommandIndependentOfSelection(
    Guid guidCmdGroup,
    uint cmdId,
    uint cmdExecOpt,
    IntPtr vaIn,
    IntPtr vaOut,
    CommandOrigin commandOrigin,
    out bool handled
)
protected:
virtual int ExecCommandIndependentOfSelection(
    Guid guidCmdGroup, 
    unsigned int cmdId, 
    unsigned int cmdExecOpt, 
    IntPtr vaIn, 
    IntPtr vaOut, 
    CommandOrigin commandOrigin, 
    [OutAttribute] bool% handled
)
protected function ExecCommandIndependentOfSelection(
    guidCmdGroup : Guid, 
    cmdId : uint, 
    cmdExecOpt : uint, 
    vaIn : IntPtr, 
    vaOut : IntPtr, 
    commandOrigin : CommandOrigin, 
    handled : boolean
) : int

Parameters

  • guidCmdGroup
    Type: System.Guid

    The GUID of the command group to which the command belongs.

  • cmdExecOpt
    Type: System.UInt32

    Values taken from the OLECMDEXECOPT enumeration, which describe how the object should execute the command.

  • vaIn
    Type: System.IntPtr

    Pointer to a VARIANTARG structure that contains input arguments. Can be a null reference (Nothing in Visual Basic).

  • vaOut
    Type: System.IntPtr

    Pointer to a VARIANTARG structure that contains command output. Can be a null reference (Nothing in Visual Basic).

  • handled
    Type: System.Boolean%

    Indicates whether the command was handled.

Return Value

Type: System.Int32

If a command is not supported without a selection, returns OLECMDERR_E_NOTSUPPORTED(). Otherwise, returns the error status of the commands called by this method.

Permissions

See Also

Reference

HierarchyNode Class

HierarchyNode Members

Microsoft.VisualStudio.Package Namespace