You can obtain a pointer to the current ContextNode through the function CurrentChunk(): currentnode = CurrentChunk (iff); The ContextNode tells you the type, ID, and size of the currently active chunk. If there is no currently active context, NULL is returned.