This structure contains information about a subfile in a container file. It is initialized by calling fpGetSubFileInfo(). This structure is defined in kvxtract.h.

typedef struct  tag_KVSubFileInfo
    char            *subFileName;
    int              subFileType;
    long             subFileSize;
    unsigned long    infoFlag;
    KVCharSet        charset;
    int              isMSBLSB;
    BYTE             fileTime[8];
    int              parentIndex;
    int              childCount;
    int             *childArray;
KVContainerSubFileInfoRec, *KVSubFileInfo;

Member Descriptions

KVStructHeader The KeyView version of the structure. See KVStructHead.

The path, file name, or path and file name of the subfile.

If the subfile is the body text of a mail file or is an embedded OLE object, KeyView provides a default file name. See Default File Names for Extracted Subfiles.


The subfile’s position in the container file’s hierarchy. The following options are available:

KVSubFileType_Main—The subfile is at the top level of the main file. This is the default subfile type. See Discussion.

KVSubFileType_Attachment—The subfile is an attachment in a file.

KVSubFileType_OLE—The subfile is an embedded OLE object in a compound document.

KVSubFileType_Folder—The subfile is a folder or the artificial root node (see Recreate a File’s Hierarchy).


The size of the subfile in bytes. This information might be useful if you do not want to extract very large files.

This value is approximate and is the maximum size of the subfile. The subfile is usually smaller than this value when it is extracted.


A bitwise flag that provides additional information about the subfile. The following flags are available:

KVSubFileInfoFlag_NeedsExtraction—The subfile might contain subfiles. It must be extracted further to conclusively determine whether it contains subfiles.

KVSubFileInfoFlag_Secure—The subfile is secured and credentials (such as user name and password) are required to extract it. This flag applies to ZIP, RAR, and PDF files only.

KVSubFileInfoFlag_SMIME—The subfile is S/MIME-encrypted and credentials are required to extract it. This applies to .eml and .pst files only.

KVSubFileInfoFlag_External—The subfile is embedded in the main file as a link and is stored externally. 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 file cannot be extracted. You must write code to access the subfile based on the path in the member subFileName.

KVSubFileInfoFlag_MailItem—When the subfile type is KVSubFileType_Attachment, this indicates that the attachment is a mail item. This flag applies to PST, MSG, and NSF files only.

charset If the subfile is not an attachment, this is the character set of the subfile. If the subfile is an attachment, the character set is KVCS_UNKNOWN.
isMSBLSB This flag indicates whether the byte order for Unicode text is Big Endian (MSBLSB) or Little Endian (LSBMSB).

When the subfile is a mail message, this is the file’s Sent time. Otherwise, it is the last modified time. The file time is not available for the following file types:

  • EML attachments
  • OLE objects in a Microsoft Office document
  • Embedded images
parentIndex The index number of this file’s parent. For example, the index of a folder in which the subfile is stored, or the file to which the subfile is attached. If a file does not have a parent, the parentIndex is -1.
childCount The number of first-level children in the subfile.
childArray A pointer to an array of first-level children in the subfile.


The KVSubFileType_Main type applies to the following for each file format:

File format KVSubFileType_Main applies to...
MSG and EML The message body.
Zip files A file inside the archive.
PST files An item that is not an attachment, an OLE object, or a root node.
MBX files A message in the MBX file.
NSF files An item that is not an attachment, an OLE object, or a root node.
PDF files An item that is not an attachment or a root node.