Поделиться через


Package.IOleCommandTarget.Exec Method

Executes a specified command or displays help for a command.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Декларация
Private Function Exec ( _
    ByRef guidGroup As Guid, _
    nCmdId As UInteger, _
    nCmdExcept As UInteger, _
    pIn As IntPtr, _
    vOut As IntPtr _
) As Integer Implements IOleCommandTarget.Exec
'Применение
Dim instance As Package
Dim guidGroup As Guid
Dim nCmdId As UInteger
Dim nCmdExcept As UInteger
Dim pIn As IntPtr
Dim vOut As IntPtr
Dim returnValue As Integer

returnValue = CType(instance, IOleCommandTarget).Exec(guidGroup, _
    nCmdId, nCmdExcept, pIn, vOut)
int IOleCommandTarget.Exec(
    ref Guid guidGroup,
    uint nCmdId,
    uint nCmdExcept,
    IntPtr pIn,
    IntPtr vOut
)
private:
virtual int Exec(
    Guid% guidGroup, 
    unsigned int nCmdId, 
    unsigned int nCmdExcept, 
    IntPtr pIn, 
    IntPtr vOut
) sealed = IOleCommandTarget::Exec
private abstract Exec : 
        guidGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdExcept:uint32 * 
        pIn:IntPtr * 
        vOut:IntPtr -> int 
private override Exec : 
        guidGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdExcept:uint32 * 
        pIn:IntPtr * 
        vOut:IntPtr -> int 
JScript does not support explicit interface implementations.

Parameters

  • guidGroup
    Type: System.Guid%
    The GUID specifying the command group to which the command belongs.
  • pIn
    Type: System.IntPtr
    A pointer to a VARIANTARG structure containing input arguments. Can be nulla null reference (Nothing in Visual Basic).
  • vOut
    Type: System.IntPtr
    A pointer to a VARIANTARG structure to receive command output. Can be nulla null reference (Nothing in Visual Basic).

Return Value

Type: System.Int32
This method returns S_OK if it succeeds, otherwise an error code. If no instance of IOleCommandTarget can be found, returns OLECMDERR_E_NOTSUPPORTED().

Implements

IOleCommandTarget.Exec(Guid%, UInt32, UInt32, IntPtr, IntPtr)

.NET Framework Security

See Also

Reference

Package Class

Package Members

Microsoft.VisualStudio.Shell Namespace