KeyView 24.1

# fpFileToOutputStreamCreate()

This function creates an output stream from an output file.

## Syntax

    BOOL pascal _export fpFileToOutputStreamCreate(
        void                *pContext,
        char                *pszFileName,
        KVOutputStream      *pOutput );

## Arguments

`pContext` | A pointer to a KeyView Export session that you initialized by calling fpInit().
`pszFileName` | A pointer to the name of the output file to create.
`pOutput` | A pointer to the developer-assigned instance of `KVOutputStream`. The `KVOutputStream` structure defines the output stream to which Export writes the generated HTML. See KVOutputStream.

## 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 `fpFileToOutputStreamFree()` 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.fpFileToOutputStreamCreate)(pKVHTML, argv[i], &Output))
       {
          printf("Error creating output stream\n");
          (*KVHTMLInt.fpFileToInputStreamFree)(pKVHTML, &Input);
          (*KVHTMLInt.fpShutDown)(pKVHTML);
          mpFreeLibrary(hKVHTML);
          return 6;
       }

Copyright 1997-2023 Open Text
Version 24.1 | Last updated December 2023

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.1

Topic Title: fpFileToOutputStreamCreate()