KeyView 24.4
KeyView Filter SDK C Programming Guide

# xxxInitDoc()

This function initializes non-zero, non-null members of `pContext`.

## Syntax

    int pascal _export xxxInitDoc(
        void             *pCFContext,
        adDocDesc        *pAutoInfo,
        long              lcbFileSize,
        KPTPIOobj        *pIO  )

## Arguments

`pCFContext` | A pointer to the global context structure for the custom reader.
`pAutoInfo` | A pointer to an `adDocDesc` structure defined in `kwautdef`.
`lcbFileSize` | The length of the source file in bytes.
`pIo` | A pointer to a `KPTPIOobj` structure defined in `kvioobj.h`.

## Returns

- Upon success, `KVERR_Success`.
- Upon error, a non-zero error code. This causes the structured access layer to shut down the process.

## Discussion

- For custom readers, the `pAutoInfo` variable can be ignored.
- If the structured access layer has determined the length of the source file, that value is provided by the `lcbFileSize` parameter. If it is zero, the file size must be determined in this function.
- The pointer `pIO` provides access to file management functions defined in `kvioobj.h`.
- In this function, all non-zero, non-`NULL` members of the global context structure should be initialized.

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: xxxInitDoc()