Compartir a través de


FlavoredProject.ExecCommand Method

Definition

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

protected:
 virtual int ExecCommand(System::UInt32 itemid, Guid % pguidCmdGroup, System::UInt32 nCmdID, System::UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
protected virtual int ExecCommand (uint itemid, ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
abstract member ExecCommand : uint32 * Guid * uint32 * uint32 * nativeint * nativeint -> int
override this.ExecCommand : uint32 * Guid * uint32 * uint32 * nativeint * nativeint -> int
Protected Overridable Function ExecCommand (itemid As UInteger, ByRef pguidCmdGroup As Guid, nCmdID As UInteger, nCmdexecopt As UInteger, pvaIn As IntPtr, pvaOut As IntPtr) As Integer

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 succeeds, it returns Microsoft.VisualStudio.VSConstants.S_OK. If it fails, it returns an error code.

Remarks

This method calls ExecCommand on the inner project.

Applies to