Class NativeLibraryLoader
- Namespace
- NVMathNet.Interop
- Assembly
- NVMath.Net.dll
Cross-platform native library loader using System.Runtime.InteropServices.NativeLibrary so that
both Windows (LoadLibrary) and Linux (dlopen) are supported
without any additional code.
public static class NativeLibraryLoaderInheritance
Inherited Members
Methods
GetExport(string, string)
Returns a function pointer for symbol inside
libraryName, loading the library on first use.
public static nint GetExport(string libraryName, string symbol)Parameters
Returns
GetOrLoad(string)
Loads or retrieves a cached handle for libraryName.
public static nint GetOrLoad(string libraryName)Parameters
libraryNamestring
Returns
UnloadAll()
Releases all loaded library handles. Do not call this while any NVMath.Net wrapper is still in use: the wrappers cache function pointers into the libraries, which dangle once the libraries are unloaded. Intended for process shutdown and tests only.
public static void UnloadAll()