IWordSink::PutWord 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.]

Puts a word and its position in the WordSink.

Syntax

HRESULT PutWord(
  [in]       ULONG cwc,
  [in] const WCHAR *pwcInBuf,
  [in]       ULONG cwcSrcLen,
  [in]       ULONG cwcSrcPos
);

Parameters

  • cwc [in]
    The number of characters in pwcInBuf.

  • pwcInBuf [in]
    A pointer to a buffer that contains an alternative form of a word from the source text. This parameter is not modified by PutWord. You can pass the pTextSource parameter from IWordBreaker::BreakText as appropriate.

  • cwcSrcLen [in]
    The number of characters in the source text buffer (indicated by the pTextSource parameter to IWordBreaker::BreakText) that correspond to the word contained in pwcInBuf.

  • cwcSrcPos [in]
    The starting position of the word in pwcInBuf in the source text buffer (indicated by the pTextSource parameter to IWordBreaker::BreakText).

Return value

This method can return one of these values.

Return code Description
S_OK

The operation was completed successfully. Also indicates that no more text is available to refill the buffer.

LANGUAGE_S_LARGE_WORD

Value of cwc is larger than the value for ulMaxTokenSize that is specified in IWordBreaker::Init.

 

Remarks

It is recommended that the PutWord method always contain the original word as found in pTextSource. Alternative forms of the word are passed to WordSink by using PutAltWord. It is also recommended that the words in pwcInBuf match the source text as closely as possible. For example, retain capitalization and accents where possible.

This call must be made for every word retrieved from pTextSource except those for which the PutAltWord call was made. The word is terminated with an EOW character when it is saved to the WordSink.

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

IWordSink