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.