Share via


ViewFilter.HandlePreExec Method

Handles pre-processing before a command is executed.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Declaration
Public Overridable Function HandlePreExec ( _
    ByRef guidCmdGroup As Guid, _
    nCmdId As UInteger, _
    nCmdexecopt As UInteger, _
    pvaIn As IntPtr, _
    pvaOut As IntPtr _
) As Boolean
public virtual bool HandlePreExec(
    ref Guid guidCmdGroup,
    uint nCmdId,
    uint nCmdexecopt,
    IntPtr pvaIn,
    IntPtr pvaOut
)
public:
virtual bool HandlePreExec(
    Guid% guidCmdGroup, 
    unsigned int nCmdId, 
    unsigned int nCmdexecopt, 
    IntPtr pvaIn, 
    IntPtr pvaOut
)
abstract HandlePreExec : 
        guidCmdGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdexecopt:uint32 * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> bool  
override HandlePreExec : 
        guidCmdGroup:Guid byref * 
        nCmdId:uint32 * 
        nCmdexecopt:uint32 * 
        pvaIn:IntPtr * 
        pvaOut:IntPtr -> bool
public function HandlePreExec(
    guidCmdGroup : Guid, 
    nCmdId : uint, 
    nCmdexecopt : uint, 
    pvaIn : IntPtr, 
    pvaOut : IntPtr
) : boolean

Parameters

  • guidCmdGroup
    Type: Guid%

    [in] The GUID of the command group.

  • nCmdId
    Type: UInt32

    [in] The specific ID of the command from the command group. This identifies the command to execute.

  • nCmdexecopt
    Type: UInt32

    [in] Additional parameters for the command (packed into a 32-bit value).

  • pvaIn
    Type: 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: IntPtr

    [in, out] An unmarshaled pointer to a Variant object to hold the result of the command, if any.

Return Value

Type: Boolean
Returns true if the command was actually handled in the pre-processing; otherwise, returns false.

Remarks

This method is called before a command is executed. However, this method can handle the command itself, in which case this method returns true, indicating the command needs no further processing.

The base method obtains the expansion provider and calls the HandlePreExec method on the ExpansionProvider object if the object exists. If the expansion provider handles the call then this method does nothing else. Otherwise, all commands supported by the base ViewFilter class are handled here and true is returned. Returns false, if the command is not supported.

.NET Framework Security

See Also

Reference

ViewFilter Class

Microsoft.VisualStudio.Package Namespace