IFilter::GetText

[This is preliminary documentation and subject to change.]

SCODE IFilter::GetText( ULONG * pcwcBuffer,
                        WCHAR * awcBuffer );
 

GetText is used to retrieve the text from the current chunk. If the current chunk does not have a flags value of CHUNK_TEXT then the error FILTER_E_NO_TEXT is returned.

On entry, pcwcBuffer contains the size, in (Unicode) characters, of awcBuffer. On exit, pcwcBuffer contains the number of characters actually written to awcBuffer. More than one call to GetText may be required to retrieve all the text in the current chunk. Each call to GetText retrieves text immediately following the last call to GetText. Note that it is perfectly legitimate for the last character in one call to be in the middle of a word, and the first character in the next call to continue the word. Search engines must handle this situation.

When all text in a chunk has been returned the next call to GetText should return FILTER_E_NO_MORE_TEXT. All additional calls to GetText should return this error until GetChunk has been called successfully, advancing to the next chunk. As an optimization, the last call that returns text may return FILTER_S_LAST_TEXT, indicating the next call to GetText returns FILTER_E_NO_MORE_TEXT. This can save the client a call.