Freigeben über


WindowPane.IOleCommandTarget.Exec Method

Executes the specified command.

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

Syntax

'Declaration
Private Function Exec ( _
    ByRef guidGroup As Guid, _
    nCmdId As UInteger, _
    nCmdExcept As UInteger, _
    pIn As IntPtr, _
    vOut As IntPtr _
) As Integer Implements IOleCommandTarget.Exec
'Usage
Dim instance As WindowPane
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 of the command group to which the command belongs.
  • nCmdExcept
    Type: System.UInt32
    Values taken from the OLECMDEXECOPT enumeration, which describe how the object should execute the command.
  • pIn
    Type: System.IntPtr
    Pointer to a VARIANTARG structure that contains input arguments. Can be nulla null reference (Nothing in Visual Basic).
  • vOut
    Type: System.IntPtr
    Pointer to a VARIANTARG structure that contains command output. Can be nulla null reference (Nothing in Visual Basic).

Return Value

Type: System.Int32
Returns OLECMDERR_E_NOTSUPPORTED() if the project manager is closed or the command is not supported. Otherwise, returns S_OK or an error code if one of the executed commands returned an error code.

Implements

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

Remarks

This method is called by Visual Studio when the user has asked to execute a particular command. There is no need to override this method. Implementers who require access to menu commands must use IMenuCommandService.

.NET Framework Security

See Also

Reference

WindowPane Class

WindowPane Members

Microsoft.VisualStudio.Shell Namespace