WindowPane.IOleCommandTarget.Exec Method

Definition

Executes the specified command.

 virtual int Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid % guidGroup, System::UInt32 nCmdId, System::UInt32 nCmdExcept, IntPtr pIn, IntPtr vOut) = Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget::Exec;
int IOleCommandTarget.Exec (ref Guid guidGroup, uint nCmdId, uint nCmdExcept, IntPtr pIn, IntPtr vOut);
abstract member Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec : Guid * uint32 * uint32 * nativeint * nativeint -> int
override this.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec : Guid * uint32 * uint32 * nativeint * nativeint -> int
Function Exec (ByRef guidGroup As Guid, nCmdId As UInteger, nCmdExcept As UInteger, pIn As IntPtr, vOut As IntPtr) As Integer Implements IOleCommandTarget.Exec

Parameters

guidGroup
Guid

The GUID of the command group to which the command belongs.

nCmdId
UInt32

The ID of the command.

nCmdExcept
UInt32

Values taken from the OLECMDEXECOPT enumeration, which describe how the object should execute the command.

pIn
IntPtr

nativeint

Pointer to a VARIANTARG structure that contains input arguments. Can be null.

vOut
IntPtr

nativeint

Pointer to a VARIANTARG structure that contains command output. Can be null.

Returns

Returns Microsoft.VisualStudio.OLE.Interop.OleConstants.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

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. If you need to get menu commands, you must use IMenuCommandService.

Applies to