ViewFilter::HandlePreExec Method (Guid, UInt32, UInt32, IntPtr, IntPtr)

 

Handles pre-processing before a command is executed.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual bool HandlePreExec(
	Guid% guidCmdGroup,
	unsigned int nCmdId,
	unsigned int nCmdexecopt,
	IntPtr pvaIn,
	IntPtr pvaOut
)

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.

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.

Return to top
Show: