public NativeLibrary(string path, INativeLibraryLoader loader) { this.path = path; this.loader = loader; this.handle = loader.LoadLibrary(path); if (this.handle == IntPtr.Zero) { throw new DllNotFoundException(path); } }