uyjulian
Developer
There is an incompatibility in older versions of modload versus newer versions.
When returning the value "2" in the entrypoint of the module, this is parsed differently between modload versions
* < 1.2: Non-resident, unloads module after entrypoint executes.
* >= 1.2: Resident, flag marked as unloadable.
However, there is a way to keep the module compatible in all modload versions (no version checking needed to return the correct return value), while enabling module unloading. The fourth argument of the entrypoint contains a pointer to the module information. In this case, set 0x10 flag on the "newflags" member of ModuleInfo_t.
When returning the value "2" in the entrypoint of the module, this is parsed differently between modload versions
* < 1.2: Non-resident, unloads module after entrypoint executes.
* >= 1.2: Resident, flag marked as unloadable.
However, there is a way to keep the module compatible in all modload versions (no version checking needed to return the correct return value), while enabling module unloading. The fourth argument of the entrypoint contains a pointer to the module information. In this case, set 0x10 flag on the "newflags" member of ModuleInfo_t.