# KVOpenFileArg

This structure defines the input arguments necessary to open a file for extraction. It is initialized by calling fpOpenFile(). This structure is defined in `kvxtract.h`.

    typedef struct  tag_KVOpenFileArg
    {
        KVStructHeader;
        KVCredential    cred;
        KVInputStream  *stream;
        char           *filePath;
        char           *extractDir;
        DWORD           openFlag;
        DWORD           reserved;
        void           *pReserved;
    }
    KVOpenFileArgRec, *KVOpenFileArg;

## Member Descriptions

`KVStructHeader` | The KeyView version of the structure. See KVStructHead.
`cred` | The credentials required to open a protected PST or NSF file. This is a pointer to the KVCredential structure. Your application can define multiple credentials to this member for multiple formats.
`stream` | A pointer to the developer-assigned instance of `KVInputStream`. The `KVInputStream` structure defines the input stream that contains the source. See KVInputStream. If you are using a file as input, this is `NULL`.
`filePath` | A pointer to the full file path to the source file. If you are using a stream as input, this is `NULL`.
`extractDir` | A pointer to the default directory to which subfiles are extracted. This directory must exist. You can use this in conjunction with `KVExtractSubFileArg->filePath` to create the full output path. See KVExtractSubFileArg.
`openFlag` | A bitwise flag that defines additional parameters for opening the file. The following flag is available: `KVOpenFileFlag_CreateRootNode`—If you set this flag, KeyView creates a root object when extracting this file’s subfiles. This root node does not have a parent and is at the highest level of the file’s tree structure. It is used internally to provide a reference point from which all other child nodes are determined, and the file’s hierarchy is created. If you want to maintain the file’s hierarchy when you extract subfiles from a container, you must set this flag. See Recreate a File’s Hierarchy for more information. The root node has an index of zero. Although not all container formats require an artificial root node, the root is created for all container formats regardless of whether the file itself contains a root directory or file.
`reserved` | Reserved for future use. It must be `NULL`.
`pReserved` | Reserved for future use. It must be `NULL`.

_FT_HTML5_bannerTitle.htm