ContextOpen()

Updated: April 19, 2023

Synopsis:

#include <aoi.h>

AOIStream_t* (*ContextOpen)(const char *name,
                            const char *mode,
                            const AOParam_t *params,
                            AOError_t *err);

Arguments:

name
The name of the stream you want to open.
mode
The mode you want to open the stream in. The mode string should match modes for fopen(), such as:
rb
Read binary
wb
Write binary
params
A pointer to an array of AOParam_t structures specifying the context parameter settings to apply.
err
A pointer to space for storing an AOError_t structure that will hold error information.

Description:

This function should apply the context parameters given in params and open the name stream in the mode access mode.

Returns:

A pointer to an AOIStream_t instance on success, or NULL if the function couldn't open the stream in the given mode. In the failure case, the function provides error details in the memory pointed to by err.