File Content Extraction 26.3
Filter SDK Java Programming Guide

# fpInit()

This function initializes a Filter session.

## Syntax

    KVErrorCode pascal fpInit(
            const char* pszKeyViewDir,
            const char* pszLicense,
            const KVFilterInitOptions* pOptions,
            KVFilterSession* pSession
    );

## Arguments

`pszKeyViewDir` | A pointer to a string that contains the path of the Filter directory (where the readers and the `formats.ini` file are located). This is normally the `install\PLATFORM\bin` directory.
`pszLicense` | A pointer to a string that contains your license key, as provided by OpenText. Copy the key exactly, with no leading or trailing spaces.
`pOptions` | A pointer to a KVFilterInitOptions structure that specifies configuration options for the new Filter session. You must initialize this structure with the `KVStructInit()` macro before modifying the structure as necessary. See KVFilterInitOptions for information about the options you can set.
`pSession` | A pointer to a Filter session that you want to initialize. When you call `fpInit()`, the pointer is set to the address of the new session context.

## Returns

The function returns an error code.

- When initialization is successful, the error code is `KVError_Success` and the session context is stored in `*pSession`. Use the Filter session in future calls to File Content Extraction - it must be passed as the first argument to some of the File Extraction API and Filter API functions.
- When initialization is unsuccessful, the return value is an error code (see KVErrorCode for more information), and `*pSession` is set to `NULL`.

## Lifetimes and Memory Management

- When the filtering context is no longer required, call fpShutdown() to terminate it. Call fpShutdown() only when `fpInit` returns `KVError_Success`.

## Discussion

- On Windows, `pszKeyViewDir` must be in the local Windows code page.
- To make sure that multi-threaded filter processes are thread-safe, you must create a unique context pointer for every thread by calling `fpInit()`. In addition, threads must not share context pointers, and you must use the same context pointer for all API calls in the same thread. Creating a context pointer for every thread does not affect performance because the context pointer uses minimal resources.

Copyright 1997-2026 Open Text
Version 26.3 | Last updated July 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.3

Topic Title: fpInit()