# xxxFillBuffer()

This function controls parsing of the source file and generation of tokens defined in `kvtoken.h`.

## Syntax

    int  pascal _export xxxFillBuffer(
        void    *pCFContext,
        BYTE    *pcBuf,
        UINT    *pnBufOut,
        int     *pnPercentDone,
        UINT     cbBufOutMax)

## Arguments

`pCFContext` | A pointer to the global context structure for the custom reader.
`pcBuf` | A pointer to a memory buffer to which the tokens are written.
`pnBufOut` | A pointer to a variable that specifies the actual number of bytes written to the token buffer.
`pnPercentDone` | A pointer to a variable that specifies the percentage completed of the file parsing.
`cbBufOutMax` | A pointer to a variable that specifies the maximum number of bytes written to the token buffer.

## Returns

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

## Discussion

- Calls are made to read and parse the source file within this function.
- This function is called repeatedly by the structured access layer until either the return value is `FALSE` or the percentage complete is 100.
- The actual number of bytes written to the token buffer must not exceed the value of `cbBufOutMax`.

© 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