ViewFilter.HandlePreExec Method
Handles pre-processing before a command is executed.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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
'Usage
Dim instance As ViewFilter
Dim guidCmdGroup As Guid
Dim nCmdId As UInteger
Dim nCmdexecopt As UInteger
Dim pvaIn As IntPtr
Dim pvaOut As IntPtr
Dim returnValue As Boolean
returnValue = instance.HandlePreExec(guidCmdGroup, _
nCmdId, nCmdexecopt, pvaIn, pvaOut)
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
)
public function HandlePreExec(
guidCmdGroup : Guid,
nCmdId : uint,
nCmdexecopt : uint,
pvaIn : IntPtr,
pvaOut : IntPtr
) : boolean
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.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
- 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.