MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / LoadUnix2

Method LoadUnix2

StereoKit/Native/NativeLib.cs:141–148  ·  view source on GitHub ↗
(string arch)

Source from the content-addressed store, hash-verified

139 [DllImport("libdl.so.2", CharSet = CharSet.Ansi, EntryPoint = "dlopen")]
140 static extern IntPtr dlopen2(string fileName, int flags);
141 static bool LoadUnix2(string arch)
142 {
143 const int RTLD_NOW = 2;
144 if (dlopen2($"./runtimes/linux-{arch}/native/libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true;
145 if (dlopen2($"{AppDomain.CurrentDomain.BaseDirectory}/runtimes/linux-{arch}/native/libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true;
146 if (dlopen2("libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true;
147 return false;
148 }
149
150 static bool IsAssemblyLoaded(string assembly)
151 => AppDomain.CurrentDomain

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected