HierarchyNode.ExecCommandThatDependsOnSelectedNodes Method

Handles execution of a command that is executed on a set of nodes.

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

Syntax

'宣言
Protected Overridable Function ExecCommandThatDependsOnSelectedNodes ( _
    guidCmdGroup As Guid, _
    cmdId As UInteger, _
    cmdExecOpt As UInteger, _
    vaIn As IntPtr, _
    vaOut As IntPtr, _
    commandOrigin As CommandOrigin, _
    selectedNodes As IList(Of HierarchyNode), _
    <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 selectedNodes As IList(Of HierarchyNode)
Dim handled As Boolean
Dim returnValue As Integer

returnValue = Me.ExecCommandThatDependsOnSelectedNodes(guidCmdGroup, _
    cmdId, cmdExecOpt, vaIn, vaOut, commandOrigin, _
    selectedNodes, handled)
protected virtual int ExecCommandThatDependsOnSelectedNodes(
    Guid guidCmdGroup,
    uint cmdId,
    uint cmdExecOpt,
    IntPtr vaIn,
    IntPtr vaOut,
    CommandOrigin commandOrigin,
    IList<HierarchyNode> selectedNodes,
    out bool handled
)
protected:
virtual int ExecCommandThatDependsOnSelectedNodes(
    Guid guidCmdGroup, 
    unsigned int cmdId, 
    unsigned int cmdExecOpt, 
    IntPtr vaIn, 
    IntPtr vaOut, 
    CommandOrigin commandOrigin, 
    IList<HierarchyNode^>^ selectedNodes, 
    [OutAttribute] bool% handled
)
protected function ExecCommandThatDependsOnSelectedNodes(
    guidCmdGroup : Guid, 
    cmdId : uint, 
    cmdExecOpt : uint, 
    vaIn : IntPtr, 
    vaOut : IntPtr, 
    commandOrigin : CommandOrigin, 
    selectedNodes : IList<HierarchyNode>, 
    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. The values 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 the command is not supported in this context, returns OLECMDERR_E_NOTSUPPORTED(). Otherwise, returns S_OK, or the error code that is returned by one of the commands called by this method.

Permissions

See Also

Reference

HierarchyNode Class

HierarchyNode Members

Microsoft.VisualStudio.Package Namespace