private static IntPtr LoadLibraryHelper(string libraryName, int flags, ref LoadLibErrorTracker errorTracker)
        {
            // do the Dos/Unix conversion
            libraryName = libraryName.Replace('\\', '/');

            IntPtr ret = Interop.Sys.LoadLibrary(libraryName);

            if (ret == IntPtr.Zero)
            {
                string?message = Marshal.PtrToStringAnsi(Interop.Sys.GetLoadLibraryError());
                errorTracker.TrackErrorMessage(message);
            }

            return(ret);
        }