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

 

Executes a specified command or displays help for a 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 specifying the command group to which the command belongs.

nCmdId
Type: System::UInt32

The ID of the command.

nCmdExcept
Type: System::UInt32

A pointer to an OLECMDEXECOPT structure specifying how the command should be executed.

pIn
Type: System::IntPtr

A pointer to a VARIANTARG structure containing input arguments. Can be null.

vOut
Type: System::IntPtr

A pointer to a VARIANTARG structure to receive command output. Can be null.

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.

Return to top
Show: