# KVMainFileInfo

This structure contains information about a main file that is open for extraction. It is initialized by calling fpGetMainFileInfo(). This structure is defined in `kvxtract.h`.

    typedef struct  tag_KVMainFileInfo
    {
        KVStructHeader;
        int             numSubFiles;
        ADDOCINFO       docInfo;
        KVCharSet       charset;
        int             isMSBLSB;
        unsigned long   infoFlag;
    }
    KVMainFileInfoRec, *KVMainFileInfo;

## Member Descriptions

`KVStructHeader` | The KeyView version of the structure. See KVStructHead.
`numSubFiles` | The number of subfiles in the main file.
`docInfo` | The file’s major format (such as Microsoft Word or Corel Presentation), as defined by the structure `ADDOCINFO`. See ADDOCINFO.
`charset` | The character set of the main file.
`isMSBLSB` | This flag indicates whether the byte order for Unicode text is Big Endian (MSBLSB) or Little Endian (LSBMSB).
`infoFlag` | A bitwise flag that provides additional information about the main file. The following flag is available: `KVMainFileInfoFlag_HasContent`—The main file contains text that can be converted. Below are some examples of how this flag is used: For an MSG file without attachments, `numSubFiles` is `1` (message body text), and this flag is `FALSE` because the MSG file itself does not contain text. For a Zip file with three files, `numSubFiles` is `3`, and this flag is `FALSE` because a Zip file does not contain text. For a Microsoft Word file with an embedded OLE object, `numSubFiles` is `1` (OLE object), and this flag is `TRUE` (Word file contains text to be converted).

## Discussion

- If `numSubFiles` is non-zero, get information on the subfile by calling fpGetSubFileInfo(), and then extract the subfiles by using fpExtractSubFile().

- If `numSubFiles` is `0`, the file does not contain subfiles and does not need to be extracted further. If the `KVMainInfoFlag_HasContent` flag is set, the file contains body text and can be passed directly to the conversion functions. See XML Export API Functions.

- If `openFlag` is set to `KVOpenFileFlag_CreateRootNode` in the call to `fpOpenFile()`, `numSubFiles` also includes the root object (index `0`) which is created by KeyView for reconstructing the file’s hierarchy. See KVOpenFileArg.

© Copyright 2006-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm