Share via


IWordBreaker::Init method

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Initializes the IWordBreaker implementation and indicates the mode in which the component operates.

Syntax

HRESULT Init(
  [in]  BOOL  fQuery,
  [in]  ULONG ulMaxTokenSize,
  [out] BOOL  *pfLicense
);

Parameters

  • fQuery [in]
    Indicates the mode in which a word breaker operates. TRUE indicates query-time word breaking. FALSE indicates index-time word breaking.

  • ulMaxTokenSize [in]
    The maximum number of characters in words that are added to the WordSink. Words that exceed this limit may be truncated.

  • pfLicense [out]
    A pointer to an output variable that receives a value that indicates whether there are license restrictions for this IWordBreaker implementation. TRUE indicates that the stemmer is restricted to authorized use only. FALSE indicates that this implementation can be used freely.

Return value

This method can return one of these values.

Return code Description
S_OK

The operation was completed successfully.

E_INVALIDARG

The pfLicense parameter is NULL.

E_FAIL

The operation failed.

LANGUAGE_E_DATABASE_NOT_FOUND

One of the components for word breaking cannot be located.

 

Remarks

The functionality of the word breaker is similar in both index creation and querying. Differences are language dependent. If pfLicense is TRUE, and if you want more information about possible license restrictions, call the GetLicenseToUse method.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008 R2

Header

Indexsrv.h

See also

IWordBreaker