WindowPane::IOleCommandTarget::Exec Method (Guid, UInt32, UInt32, IntPtr, IntPtr)

 

Executes the specified command.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

private:
virtual int Exec(
	Guid% guidGroup,
	unsigned int nCmdId,
	unsigned int nCmdExcept,
	IntPtr pIn,
	IntPtr vOut
) sealed = IOleCommandTarget::Exec

Parameters

guidGroup
Type: System::Guid

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

nCmdId
Type: System::UInt32

The ID of the command.

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 null.

vOut
Type: System::IntPtr

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

Return Value

Type: System::Int32

Returns F: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.

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.

Return to top
Show: