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.GuidThe GUID of the command group to which the command belongs.
cmdId
Type: System.UInt32The ID of the command.
cmdExecOpt
Type: System.UInt32Values taken from the OLECMDEXECOPT enumeration. The values describe how the object should execute the command.
vaIn
Type: System.IntPtrPointer to a VARIANTARG structure that contains input arguments. Can be a null reference (Nothing in Visual Basic).
vaOut
Type: System.IntPtrPointer to a VARIANTARG structure that contains command output. Can be a null reference (Nothing in Visual Basic).
commandOrigin
Type: Microsoft.VisualStudio.Package.CommandOriginThe CommandOrigin value. Can be either UiHierarchy or OleCommandTarget.
selectedNodes
Type: System.Collections.Generic.IList<HierarchyNode>The list of selected nodes.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.