initHookRegister() allows external code to be called at certains points (initHookState) during IOC startup and shutdown.
The overall states (see getIocState() ) of an IOC are:
- Void
- From process start until iocInit()
- After iocShutdown()
- Building
- Transiant state during iocInit()
- Built
- Transiant state during iocInit()
- Running
- After iocInit() or iocRun()
- Paused
The following C++ example shows how to use this facility:
#include <initHooks.h>
static void myHookFunction(initHookState state)
{
if(state == initHookAfterDatabaseRunning) {
}
}
static void myRegistrar(void) {
initHookRegister(&myHookFunction);
}
extern "C" {
}