File Content Extraction 26.1
Filter SDK C Programming Guide

# xxxAllocateContext()

This function allocates a global memory block for a data context. A handle to this memory is returned to the structured access layer. The structured access layer passes this handle back to all reader entry points.

## Syntax

    void * pascal _export xxxAllocateContext(
        void                     *pSALContext,
        LPARAM (pascal *fp)(void *,
        UINT                      LPARAM),
        Bool                     *pbOpenDoc,
        TPVAPIServices           *pVapi,
        DWORD                     dwFlags)

## Arguments

`pSALContext` | A pointer to the global data context structure of the structured access layer.
`fp` | A pointer to a structure of callback functions supported by the structured access layer.
`pbOpenDoc` | You must set this `BOOL` value to `TRUE` if the allocation of memory for the global data context structure is successful.
`pVapi` | A pointer to a structure providing memory management and character conversion functions. Because this functionality is proprietary to OpenText, `TPVAPIServices` is redefined as `void` in `kvcfsr.h`.
`dwFlags` | Run-time flags controlled by the structured access layer.

## Returns

- Upon success, a pointer to the global data context structure for the custom reader. This pointer is passed back to all other custom reader entry points.
- Upon error, a `NULL` pointer. This causes the structured access layer to shut down the process.

## Discussion

The global context structure should be `memset()` to zero in this function.

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

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: File Content Extraction 26.1

Topic Title: xxxAllocateContext()