# 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 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm