AODeInitializer

Updated: October 26, 2022

DLL initializer and cleanup interface

Synopsis:

#include <aoi.h>

typedef struct
{
    int32_t (*Init)(const AOICtrl_t *interfaces);
    void (*Cleanup)(void);
} AODeInitializer;

This interface allows DLLs to perform initialization operations just after being loaded and cleanup operations just before being unloaded. The first operation could involve setting global variables or causing the DLL to be unloaded immediately or be kept in memory permanantly. The second operation is meant to release resources kept in global variables.