This topic has not yet been rated - Rate this topic

IVsFinder.Init Method

Sets the find string.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
int Init(
	uint grfOptions,
	string pszFindPattern,
	int fReinit,
	out uint pResult
)

Parameters

grfOptions
Type: UInt32

[in] Flag containing find options. Values are taken from the __VSFINDOPTIONS enum.

pszFindPattern
Type: String

[in] Pattern to search for.

fReinit
Type: Int32

[in] true for a new pattern.

pResult
Type: UInt32

[out] Enumeration value indicating result of the operation. Values are taken from the __VSFINDERROR enum.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From textfind.idl:

HRESULT IVsFinder::Init(
   [in] DWORD grfOptions,
   [in] LPCOLESTR pszFindPattern,
   [in] BOOL fReinit
);

IVsFinder.Init sets the find string, compiling it for the appropriate matching type. Set fReinit to true when you know you have a different pattern and want to bypass the pattern cache.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.