This documentation is archived and is not being maintained.

ViewFilter.HandlePreExec Method

Handles pre-processing before a command is executed.

This method is not CLS-compliant.  

Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in microsoft.visualstudio.package.languageservice.dll)

public virtual bool HandlePreExec (
	ref Guid guidCmdGroup,
	uint nCmdId,
	uint nCmdexecopt,
	IntPtr pvaIn,
	IntPtr pvaOut
public boolean HandlePreExec (
	/** @ref */ Guid guidCmdGroup, 
	UInt32 nCmdId, 
	UInt32 nCmdexecopt, 
	IntPtr pvaIn, 
	IntPtr pvaOut
JScript does not support passing value-type arguments by reference.



[in] The GUID of the command group.


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


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


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


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

Return Value

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

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.