IVsFindTarget.GetCapabilities(Boolean[], UInt32[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies your supported capabilities.
public:
int GetCapabilities(cli::array <bool> ^ pfImage, cli::array <System::UInt32> ^ pgrfOptions);
public:
int GetCapabilities(Platform::Array <bool> ^ pfImage, Platform::Array <unsigned int> ^ pgrfOptions);
int GetCapabilities(std::Array <bool> const & pfImage, std::Array <unsigned int> const & pgrfOptions);
public int GetCapabilities (bool[] pfImage, uint[] pgrfOptions);
abstract member GetCapabilities : bool[] * uint32[] -> int
Public Function GetCapabilities (pfImage As Boolean(), pgrfOptions As UInteger()) As Integer
Parameters
- pfImage
- Boolean[]
[out] Set to true if you support GetSearchImage(UInt32, IVsTextSpanSet[], IVsTextImage).
- pgrfOptions
- UInt32[]
[out] Specifies supported options, syntax, and actions. Values are taken from the __VSFINDOPTIONS enumeration.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsFindTarget::GetCapabilities(
[out, custom(DE89D360-C06A-11d2-936C-D714766E8B50,"optional")] BOOL * pfImage
);
You must explicitly set all options, syntax, and actions that are supported.
To force Find in Selection on, return both FR_Selection and FR_SelectionDefault. FR_SelectionDefault should be set for large or line-spanning selections, and not set for small selections.
Targets that do not have the notion of hidden text should always claim support for FR_Hidden and simply ignore the flag if it is passed to other methods. This allows Find in open documents to work uniformly. In other words, Hidden text is an ignorable or "don't care" case for targets that do not have the notion of hidden text, or are unable to support it.
If you claim support for FR_Wildcard or FR_RegExpr, you should implement the same syntax and semantics as the environment. This can be achieved by using IVsFindHelper, or the Visual Studio internal libraries to perform the matching. If you do not support the same syntax, the helper menus on the dialogs won't be usable for your target.