The STAT_CHUNK structure describes a chunk.
typedef struct tagSTAT_CHUNK
{
ULONG idChunk;
CHUNK_BREAKTYPE breakType;
CHUNKSTATE flags;
LCID locale;
FULLPROPSPEC attribute;
ULONG idChunkSource;
ULONG cwcStartSource;
ULONG cwcLenSource;
} STAT_CHUNK;
Following is an example of this that might come from a book:
The small detective exclaimed, "C'est finis!"
Confessions
The room was silent for several minutes. After thinking very hard about it, the young woman asked, "But how did you know?"
This section might be broken into chunks as follows:
ID | Text | breakType | flags | locale | attribute |
---|---|---|---|---|---|
1 | The small dete | N/A | CHUNK_TEXT | ENGLISH_UK | CONTENT |
2 | ctive exclaimed, | CHUNK_NO_ BREAK |
N/A | N/A | N/A |
3 | "C'est finis!" | CHUNK_EOW | CHUNK_TEXT | FRENCH_BELGIAN | CONTENT |
4 | Confessions | CHUNK_EOC | CHUNK_TEXT | ENGLISH_UK | CHAPTER_ NAMES |
5 | Confessions | CHUNK_EOP | CHUNK_TEXT | ENGLISH_UK | CONTENT |
6 | The room was silent for several minutes. | CHUNK_EOP | CHUNK_TEXT | ENGLISH_UK | CONTENT |
7 | After thinking very hard about it, the young woman asked, "But how did you know?" | CHUNK_EOS | CHUNK_TEXT | ENGLISH_UK | CONTENT |
The following three fields are used to describe the source of a derived chunk, that is, one that can be mapped back to a section of contents. For example, the heading of a chapter is both contents and a special type of contents — heading; heading would be a derived chunk. If the text of the current non-contents chunk (psuedo-property or property) is derived from some contents chunk, then:
Information provided by idChunkSource, cwcStartSource, and cwcLenSource is useful for a search engine that highlights hits. If the query is done for a pseudoproperty, the search engine will highlight the original text from which the text of the pseudoproperty has been derived. For instance, for a C++ code filter, when searching for MyFunction in pseudoproperty "function definitions," the browser will highlight the function header in the file. If the chunk is not derived, idChunkSource must be the same as idChunk. If the filter attributes specify a pseudoproperty only, then there is no content chunk from which the current pseudoproperty chunk is derived. In this case, idChunkSource must be set to 0, which is an invalid chunk id.
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in filter.h.
IFilter::GetChunk, IFilter::GetText, IFilter::GetValue, CHUNK_BREAKTYPE