IInkAnalyzer::SearchWithLanguageId method

Provides a fuzzy, case-insensitive phrase based search for analyzed writing strokes and analyzed drawing strokes that have recognized types.

Syntax

HRESULT SearchWithLanguageId(
  [in]      BSTR  bstrPhraseToMatch,
  [in]      LONG  lSearchStringLanguageId,
  [in, out] ULONG *pulSearchResultCount,
  [out]     ULONG **ppulStrokeCountPerResult,
  [in, out] ULONG *pulStrokeIdsCount,
  [out]     ULONG **ppulStrokeIds
);

Parameters

bstrPhraseToMatch [in]

The phrase that will be found in the alternates for the currently analyzed strokes.

lSearchStringLanguageId [in]

The LCID associated with the string that is passed. Used to convert the case internally to support case insensitive comparisons.

pulSearchResultCount [in, out]

The maximum number of results returned from the search.

ppulStrokeCountPerResult [out]

Pointer to an array of the number of strokes in each search result.

pulStrokeIdsCount [in, out]

The number of stroke IDs in ppulStrokeIds.

ppulStrokeIds [out]

Pointer to an array of stroke IDs representing a set of sets of strokes.

Return value

For a description of the return values, see Classes and Interfaces - Ink Analysis.

Remarks

This search finds multi-word and single word substrings. Both alternate recognition results and alternate segmentations are searched.

All incoming strings will be converted to a single casing for comparison utilizing the LCID of the current thread to do this conversion to respect cultural case conventions.

The string passed is treated as a phrase. Words and characters must appear in the alternates for the strokes in the order specified. The first and last words of the phrase may be matched as substrings (the first word appearing at the end of an alternate and the last word appearing at the beginning of one), but any other words (those inside of the phrase) must appear as whole words.

If the string passed in has no whitespace in between characters, the substring may be found anywhere inside of a single word in an alternate.

Only the presence or absence of whitespace between characters changes the results of search. Whitespace that is not surrounded by characters is ignored. The type of the whitespace is ignored (a tab or a space between characters will give the same result). The amount of whitespace does not matter - one space or two spaces in between characters will give the same result.

Search does not generate PopulateContextNode events. Only the strokes that have already been populated will be searched.

Requirements

Requirement Value
Minimum supported client
Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server
None supported
Header
IACom.h (also requires IACom_i.c)
DLL
IACom.dll

See also

IInkAnalyzer