KeyView 24.4
KeyView Filter SDK C Programming Guide

# fpOpenFileFromFilterSession()

This function opens a container file so that you can extract its subfiles.

## Syntax

    KVErrorCode (pascal *fpOpenFileFromFilterSession)(
        KVFilterSession session,
        KVOpenFileArg openArg,
        void** pFile
    );

## Arguments

`session` | A KeyView Filter session that you initialized by calling fpInit().
`openArg` | A pointer to a KVOpenFileArg structure which contains the parameters necessary to open a file for extraction. Before you initialize the `KVOpenFileArg` structure, use the macro `KVStructInit` to initialize the `KVStructHead` structure.
`pFile` | A handle for the opened file. Use this handle in subsequent file extraction calls to identify the source file.

## Returns

- If the file is opened successfully, the return value is `KVERR_Success`.
- If the file is not opened, the return value is an error code and `pFile` points to `NULL`.

## Discussion

After you have finished extracting the file, call fpCloseFile() to free the memory allocated by this function.

When extracting out-of-process in stream mode, you can only open one container at a time (per `session`).

## Example

    KVOpenFileArgRec openArg;

    // Initialize the structure using KVStructInit
    KVStructInit(&openArg);

    openArg.extractDir = destDir;
    openArg.document = pDocument;

    /*Open the main file */
    if (error = extractInterface->fpOpenFileFromFilterSession(session, &openArg, &pFile))
    {
        extractInterface->fpCloseFile(pFile);
        pFile = NULL;
    }

Copyright 1997-2024 Open Text
Version 24.4 | Last updated September 2024

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: IDOL KeyView 24.4

Topic Title: fpOpenFileFromFilterSession()