ViewFilter.QueryParameterList(Guid, UInt32, UInt32, IntPtr, IntPtr) Method

Definition

The parameter list of a command is queried by calling Exec with the LOWORD of nCmdexecopt set to OLECMDEXECOPT_SHOWHELP (instead of the more usual OLECMDEXECOPT_DODEFAULT), the HIWORD of nCmdexecopt set to VSCmdOptQueryParameterList, pvaIn set to NULL, and pvaOut pointing to an empty VARIANT ready to receive the result BSTR. This should be done only for commands that are marked with the ALLOWPARAMS flags in the command table.

protected:
 virtual int QueryParameterList(Guid % guidCmdGroup, System::UInt32 nCmdId, System::UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
protected virtual int QueryParameterList (ref Guid guidCmdGroup, uint nCmdId, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut);
abstract member QueryParameterList : Guid * uint32 * uint32 * nativeint * nativeint -> int
override this.QueryParameterList : Guid * uint32 * uint32 * nativeint * nativeint -> int
Protected Overridable Function QueryParameterList (ByRef guidCmdGroup As Guid, nCmdId As UInteger, nCmdexecopt As UInteger, pvaIn As IntPtr, pvaOut As IntPtr) As Integer

Parameters

guidCmdGroup
Guid

[in] The GUID of the command group.

nCmdId
UInt32

[in] The ID of the command for which to get the parameter.

nCmdexecopt
UInt32

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

pvaIn
IntPtr

nativeint

[in] Always null.

pvaOut
IntPtr

nativeint

[in, out] An unmarshaled pointer to a Variant object to hold the parameter of the command expressed as a string.

Returns

Usually returns 0 if ok, or OLECMDERR_E_NOTSUPPORTED

Remarks

This method is typically called from an implementation of the QueryStatus method when the nCmdexecopt parameter contains the OLECMDEXECOPT_SHOWHELP option in order to return a text representation of the parameters.

If you have added support for additional commands in your language service and any of those commands have parameter lists, then you must derive a class from the ViewFilter class and override this method.

The base class always returns OLECMDERR_E_NOTSUPPORTED.

In the default managed package framework implementation of the language service classes, this method is called from the <xref:Microsoft.VisualStudio.Package.ViewFilter.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus%2A> method if the nCmdexecopt parameter contains the OLECMDEXECOPT_SHOWHELP option.

Applies to