Place callout DLL/SO/DYLIB in the bin folder of your InterSystems IRIS installation. Library file should be placed into a path returned by write ##class(isc.SetEnv).GetLib()
User guide
Once per system start call: write ##class(isc.SetEnv).Setup()
Call: write ##class(isc.SetEnv).SetEnvVar(VarName, Value) to set environment variable
Call: write $system.Util.GetEnviron(VarName) to check that variable assignment was a success. This is a required action on some platforms.