Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves text (text-type properties) from the current chunk, which must have a CHUNKSTATE enumeration value of CHUNK_TEXT.
Syntax
SCODE GetText( ULONG *pcwcBuffer, WCHAR *awcBuffer );
Parameters
- pcwcBuffer
[in, out] On entry, the size of awcBuffer array in wide/Unicode characters. On exit, the number of Unicode characters written to awcBuffer. Note that this value is not the number of bytes in the buffer.- awcBuffer
[out] 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
Returns one of the following values.
S_OK Successful completion. 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, which indicates 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.
See Also
CHUNKSTATE, IFilter, IFilter::GetValue, IFilter::GetChunk, Secure Code Practices, STAT_CHUNK