HierarchyNode.InternalExecCommand Method

The main entry point for command execution. It is called from the IVsUIHierarchy and IOleCommandTarget execution methods.

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

Syntax

'宣言
Protected Overridable Function InternalExecCommand ( _
    guidCmdGroup As Guid, _
    cmdId As UInteger, _
    cmdExecOpt As UInteger, _
    vaIn As IntPtr, _
    vaOut As IntPtr, _
    commandOrigin As CommandOrigin _
) 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 returnValue As Integer

returnValue = Me.InternalExecCommand(guidCmdGroup, _
    cmdId, cmdExecOpt, vaIn, vaOut, commandOrigin)
protected virtual int InternalExecCommand(
    Guid guidCmdGroup,
    uint cmdId,
    uint cmdExecOpt,
    IntPtr vaIn,
    IntPtr vaOut,
    CommandOrigin commandOrigin
)
protected:
virtual int InternalExecCommand(
    Guid guidCmdGroup, 
    unsigned int cmdId, 
    unsigned int cmdExecOpt, 
    IntPtr vaIn, 
    IntPtr vaOut, 
    CommandOrigin commandOrigin
)
protected function InternalExecCommand(
    guidCmdGroup : Guid, 
    cmdId : uint, 
    cmdExecOpt : uint, 
    vaIn : IntPtr, 
    vaOut : IntPtr, 
    commandOrigin : CommandOrigin
) : int

Parameters

  • guidCmdGroup
    Type: System.Guid

    The GUID of the command group of the command.

  • 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).

Return Value

Type: System.Int32

OLECMDERR_E_NOTSUPPORTED() if the project manager is unavailable or if the command is not supported; otherwise, S_OK if the command succeeded or if it was aborted or canceled; otherwise, returns the error code that is returned by the command.

Permissions

See Also

Reference

HierarchyNode Class

HierarchyNode Members

Microsoft.VisualStudio.Package Namespace