Open topic with navigation

# 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 returned from `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 XML. 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.

## Example

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

    if (!(*KVXMLInt.fpFileToOutputStreamCreate)(pKVXML, argv[i], &Output))
       {
          printf("Error creating output stream\n");
          (*KVXMLInt.fpFileToInputStreamFree)(pKVXML, &Input);
          (*KVXMLInt.fpShutDown)(pKVXML);
          mpFreeLibrary(hKVXML);
          return 6;
       }

© 2006-2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm