private void LoadLibrary()
        {
            var dllToLoad = Library;

            _nativeLibraryPointer = NativeLoadLibraryMethods.LoadLibrary(dllToLoad);

            if (_nativeLibraryPointer == IntPtr.Zero)
            {
                throw new Exception($"Error Code ({Marshal.GetLastWin32Error()}) while trying to load {dllToLoad}");
            }
        }
 private IntPtr ResolveNativeMethode(string procedureName)
 {
     return(NativeLoadLibraryMethods.GetProcAddress(_nativeLibraryPointer, procedureName));
 }
 public void Dispose()
 {
     NativeLoadLibraryMethods.FreeLibrary(_nativeLibraryPointer);
 }