To initialize an extension package, the following optional function may be defined:
extern HUserExport Herror HXPkgMain(Hproc_handle)
If defined, HALCON will call this function upon loading the extension package. For example, this mechanism is useful to initialize synchronization objects (e.g., mutexes) that will be used in the extension package.