ViewFilter.IOleCommandTarget.Exec Method
Handles execution of a supported command.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'Declaration
Private Function Exec ( _
ByRef guidCmdGroup As Guid, _
nCmdId As UInteger, _
nCmdexecopt As UInteger, _
pvaIn As IntPtr, _
pvaOut As IntPtr _
) As Integer Implements IOleCommandTarget.Exec
int IOleCommandTarget.Exec(
ref Guid guidCmdGroup,
uint nCmdId,
uint nCmdexecopt,
IntPtr pvaIn,
IntPtr pvaOut
)
private:
virtual int Exec(
Guid% guidCmdGroup,
unsigned int nCmdId,
unsigned int nCmdexecopt,
IntPtr pvaIn,
IntPtr pvaOut
) sealed = IOleCommandTarget::Exec
private abstract Exec :
guidCmdGroup:Guid byref *
nCmdId:uint32 *
nCmdexecopt:uint32 *
pvaIn:IntPtr *
pvaOut:IntPtr -> int
private override Exec :
guidCmdGroup:Guid byref *
nCmdId:uint32 *
nCmdexecopt:uint32 *
pvaIn:IntPtr *
pvaOut:IntPtr -> int
JScript does not support explicit interface implementations.
Parameters
guidCmdGroup
Type: System.Guid%[in] The GUID of the command group.
nCmdId
Type: System.UInt32[in] The specific ID of the command from the command group. This identifies the command to execute.
nCmdexecopt
Type: System.UInt32[in] Additional parameters for the command (packed into a 32-bit value).
pvaIn
Type: System.IntPtr[in] An unmarshaled pointer to a Variant object holding any parameters required by the command. This can be a null value indicating there are no additional parameters.
pvaOut
Type: System.IntPtr[in, out] An unmarshaled pointer to a Variant object to hold the result of the command, if any.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code. If a particular command is not supported, returns OLECMDERR_E_NOTSUPPORTED.
Implements
IOleCommandTarget.Exec(Guid%, UInt32, UInt32, IntPtr, IntPtr)
Remarks
This method is responsible for handling any supported commands.. This method is called in response to any command given by the user, from a key press to a menu or toolbar selection. This is where the language service handles support for IntelliSense and any other operations that require interaction with the user's actions (such as smart indenting).
This is an implementation of the Exec method on the IOleCommandTarget interface.
The base method calls the QueryParameterList method if the option OLECMDEXECOPT_SHOWHELP is specified in nCmdexecopt. Otherwise, the base method calls the CheckCaretPosition method on the TextTipData object if the tool tip is active, then the base method calls the ExecCommand method. If ExecCommand returns an error then the next command target in the chain is called to try to handle the command.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.