Condividi tramite


FlavoredProject.IVsUIHierarchy.ExecCommand Method

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

Namespace:  Microsoft.VisualStudio.Shell.Flavor
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Private 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
int IVsUIHierarchy.ExecCommand(
    uint itemid,
    ref Guid pguidCmdGroup,
    uint nCmdID,
    uint nCmdexecopt,
    IntPtr pvaIn,
    IntPtr pvaOut
)
private:
virtual int ExecCommand(
    unsigned int itemid, 
    Guid% pguidCmdGroup, 
    unsigned int nCmdID, 
    unsigned int nCmdexecopt, 
    IntPtr pvaIn, 
    IntPtr pvaOut
) sealed = IVsUIHierarchy::ExecCommand
private abstract ExecCommand : 
        itemid:uint32 * 
        pguidCmdGroup:Guid byref * 
        nCmdID:uint32 * 
        nCmdexecopt:uint32 * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> int  
private override ExecCommand : 
        itemid:uint32 * 
        pguidCmdGroup:Guid byref * 
        nCmdID:uint32 * 
        nCmdexecopt:uint32 * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> int
JScript does not support explicit interface implementations.

Parameters

  • itemid
    Type: 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 [F:Microsoft.VisualStudio.VSConstants.][VSITEMID_SELECTION].

  • pguidCmdGroup
    Type: Guid%

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

  • nCmdID
    Type: UInt32

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

  • nCmdexecopt
    Type: UInt32

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

  • pvaIn
    Type: IntPtr

    A pointer to a VARIANTARG structure containing input arguments. Can be nulla null reference (Nothing in Visual Basic).

  • pvaOut
    Type: IntPtr

    A pointer to a VARIANTARG structure to receive command output. Can be nulla null reference (Nothing in Visual Basic).

Return Value

Type: Int32
If the method succeeded, S_OK, otherwise an error code.

Implements

IVsUIHierarchy.ExecCommand(UInt32, Guid%, UInt32, UInt32, IntPtr, IntPtr)

Remarks

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

.NET Framework Security

See Also

Reference

FlavoredProject Class

Microsoft.VisualStudio.Shell.Flavor Namespace