TextRange_FindText Function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation COM interfaces instead.

Returns the first text range in the specified direction that contains the text the client is searching for.

Syntax

HRESULT TextRange_FindText(      
    HUIATEXTRANGE hobj,
    BSTR text,
    BOOL backward,
    BOOL ignoreCase,
    HUITEXTRANGE *pRetVal
);

Parameters

  • hobj
    [in] The text range to search.
  • text
    [in] The string to search for.
  • backward
    [in] TRUE to search backward; otherwise FALSE.
  • ignoreCase
    [in] TRUE to specify a case-insensitive search; otherwise FALSE.
  • pRetVal
    [out] When this function returns, contains the text range for the first span of text that matches the string the client is searching for. This parameter is passed uninitialized.

Return Value

Returns S_OK if successful or an error value otherwise.

Function Information

Stock Implementation uiautomationcore.dll
Custom Implementation No
Header uiautomationcoreapi.h
Import library uiautomationcore.lib
Minimum operating systems Windows XP