File Content Extraction 26.1
HTML Export SDK C Programming Guide

# fpFileToInputStreamCreate()

This function creates an input stream from an input file.

## Syntax

    BOOL pascal _export fpFileToInputStreamCreate(
        void            *pContext,
        char            *pszFileName,
        KVInputStream   *pInput);

## Arguments

`pContext` | A pointer to an Export session that you initialized by calling fpInit().
`pszFileName` | A pointer to the name of the input file to be converted.
`pInput` | A pointer to the developer-assigned instance of `KVInputStream`. The `KVInputStream` structure defines the input stream that contains the source for the conversion. See KVInputStream.

## Returns

- If the call is successful, the return value is `TRUE`.

- If this call is unsuccessful, the return value is `FALSE`. Processing is halted.

## Discussion

- After the conversion is complete, call `fpFileToInputStreamFree()` to free the memory allocated by this function.

- On Windows, `pszFileName` must be in the local Windows code page.

## Example

The following sample code is from the `cnv2html` sample program:

    if(!(*KVHTMLInt.fpFileToInputStreamCreate)(pKVHTML, argv[i++], &Input))
       {
          printf("Error creating input stream\n");
          (*KVHTMLInt.fpShutDown)(pKVHTML);
          mpFreeLibrary(hKVHTML);
          return (5);
       }

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 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.1

Topic Title: fpFileToInputStreamCreate()