Partager via


IVsFindTarget.GetCapabilities Method

Specifies your supported capabilities.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function GetCapabilities ( _
    <OutAttribute> pfImage As Boolean(), _
    <OutAttribute> pgrfOptions As UInteger() _
) As Integer
int GetCapabilities(
    bool[] pfImage,
    uint[] pgrfOptions
)
int GetCapabilities(
    [OutAttribute] array<bool>^ pfImage, 
    [OutAttribute] array<unsigned int>^ pgrfOptions
)
abstract GetCapabilities : 
        pfImage:bool[] byref * 
        pgrfOptions:uint32[] byref -> int
function GetCapabilities(
    pfImage : boolean[], 
    pgrfOptions : uint[]
) : int

Parameters

  • pgrfOptions
    Type: array<System.UInt32[]

    [out] Specifies supported options, syntax, and actions. Values are taken from the __VSFINDOPTIONS enumeration.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsFindTarget Interface

Microsoft.VisualStudio.TextManager.Interop Namespace