File Content Extraction 26.2
HTML Export SDK C Programming Guide

# fpGetSubFileInfo()

This function gets information about a subfile in a container file.

## Syntax

    int (pascal *fpGetSubFileInfo)  (
        void                    *pFile,
        int                      index,
        KVSubFileInfo           *subFileInfo);

## Arguments

`pFile` | The identifier of the main file. This is a file handle returned from fpOpenFile().
`index` | The index number of the subfile for which to retrieve information.
`subFileInfo` | A pointer to the KVSubFileInfo structure, which defines information about the subfile.

## Returns

- If the file information is retrieved, the return value is `KVERR_Success`.

- If the file information is not retrieved, the return value is an error code.

## Discussion

- Before retrieving any subfile information, you must get the main file information by calling fpGetMainFileInfo().

- After the subfile information is retrieved, call fpFreeStruct() to free the memory allocated by this function. Call fpFreeStruct() only when `fpGetSubFileInfo()` returns `KVError_Success`.

- If the root node is not enabled, the first subfile is index `0`. If the root node is enabled, the first subfile is index `1`. The root node is required to recreate a file’s hierarchy. See Create a Root Node.

- The members `subFileInfo->parentIndex` and `subFileInfo->childArray` enable you to recreate a file’s hierarchy. Because `childArray` retrieves only the first-level children in the subfile, you must call `fpGetSubFileInfo()` repeatedly until information for the leaf-node children is extracted. See Understand the Subfile Hierarchy.

- If the subfile is embedded in the main file as a link and is stored externally, `subFileInfo->infoFlag` is set to `KVSubFileInfoFlag_External`. For example, the subfile`` might be an object that was embedded in a Word document by using "Link to File," or an attachment that is referenced in an MBX message. This type of subfile cannot be extracted. You must write code to access the subfile based on the path in the member `subFileInfo->subFileName`. See KVSubFileInfo.

- The `KVSubFileInfoFlag_External` flag is not set for an OLE object that is embedded as a link in a Microsoft PowerPoint file. File Content Extraction can detect linked objects in a Microsoft PowerPoint file only when the object is extracted. See fpExtractSubFile().

## Example

    KVSubFileInfo    subFileInfo = NULL;
    for ( index = 0; index < fileInfo->numSubFiles; index++)
    {
      error=extractInterface->fpGetSubFileInfo(pFile,index,&subFileInfo);
      if ( error )
      {
         extractInterface->fpFreeStruct(pFile,subFileInfo);
         subFileInfo = NULL;
      }

Copyright 1997-2026 Open Text
Version 26.2 | Last updated April 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.2

Topic Title: fpGetSubFileInfo()