共用方式為


FlavoredProject.IVsUIHierarchy.ExecCommand Method

Definition

Executes a command on a specific item within a UI hierarchy window, or on the hierarchy itself.

 virtual int Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand(System::UInt32 itemid, Guid % pguidCmdGroup, System::UInt32 nCmdID, System::UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) = Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy::ExecCommand;
int IVsUIHierarchy.ExecCommand (uint itemid, ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
abstract member Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand : uint32 * Guid * uint32 * uint32 * nativeint * nativeint -> int
override this.Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand : uint32 * Guid * uint32 * uint32 * nativeint * nativeint -> int
Function ExecCommand (itemid As UInteger, ByRef pguidCmdGroup As Guid, nCmdID As UInteger, nCmdexecopt As UInteger, pvaIn As IntPtr, pvaOut As IntPtr) As Integer Implements IVsUIHierarchy.ExecCommand

Parameters

itemid
UInt32

The identifier of the item affected by the command. For single selection, this value is the actual item ID. For multiple selections, set itemid equal to Microsoft.VisualStudio.VSConstants.VSITEMID_SELECTION.

pguidCmdGroup
Guid

Unique identifier of the command group. All the commands in nCmdID must belong to the group specified by pguidCmdGroup.

nCmdID
UInt32

The command to be executed. This command must belong to the group specified with pguidCmdGroup.

nCmdexecopt
UInt32

A member of the OLECMDEXECOPT enumeration, describing the type of action to perform.

pvaIn
IntPtr

nativeint

A pointer to a VARIANTARG structure containing input arguments. Can be null.

pvaOut
IntPtr

nativeint

A pointer to a VARIANTARG structure to receive command output. Can be null.

Returns

If the method succeeded, S_OK, otherwise an error code.

Implements

Remarks

This method calls the ExecCommand method, which calls the ExecCommand method on the inner project.

Applies to