2using System.Runtime.InteropServices;
7#if FIRST_PASS == false && IMPORTER == FALSE && EXPORTER == false
12 internal class NativeLibraryHandle : SafeHandle
19 internal NativeLibraryHandle(IntPtr handle) :
20 base(IntPtr.Zero, true)
26 public override bool IsInvalid => handle == IntPtr.Zero;
29 protected override bool ReleaseHandle()
31 NativeLibrary.Free(handle);
41 public NativeLibraryExport GetExport(
string name,
int argl = -1) => NativeLibrary.GetExport(handle, name, argl) is nint h and not 0 ?
new NativeLibraryExport(
this, h) : null;