IFilter::GetText method (filter.h)

Note

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.

Retrieves text (text-type properties) from the current chunk, which must have a CHUNKSTATE enumeration value of CHUNK_TEXT.

Syntax

SCODE GetText(
  [in, out] ULONG *pcwcBuffer,
  [out]     WCHAR *awcBuffer
);

Parameters

[in, out] pcwcBuffer

On entry, the size of awcBuffer array in wide/Unicode characters. On exit, the number of Unicode characters written to awcBuffer.

[out] awcBuffer

Text retrieved from the current chunk. Do not terminate the buffer with a character. Use a null-terminated string. The null-terminated string should not exceed the size of the destination buffer.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was completed successfully.
FILTER_E_NO_TEXT
The flags member of the STAT_CHUNK structure for the current chunk does not have a value of CHUNK_TEXT.
FILTER_E_NO_MORE_TEXT
All the text in the current chunk has been returned. Additional calls to the GetText method should return this error until the IFilter::GetChunk method has been called successfully.
FILTER_S_LAST_TEXT
As an optimization, the last call that returns text can return FILTER_S_LAST_TEXT, indicating that the next call to the GetText method will return FILTER_E_NO_MORE_TEXT. This optimization can save time by eliminating unnecessary calls to GetText.

Remarks

If the current chunk is too large for the awcBuffer array, more than one call to the GetText method can be required to retrieve all the text in the current chunk. Each call to the GetText method retrieves text that immediately follows the text from the last call to the GetText method. The last character from one call can be in the middle of a word, and the first character in the next call would continue that word. Search engines must handle this situation.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header filter.h

See also

CHUNKSTATE

IFilter