internal static bool FreeLibrary(IntPtr handle)
        {
            string errorMsg = null;

            if (IsWindows)
            {
                return(WindowsLoader.FreeLibrary(handle));
            }

            throw new InvalidOperationException("Unsupported platform.");
        }
示例#2
0
        internal static bool FreeLibrary(IntPtr handle)
        {
            string errorMsg = null;

            if (IsWindows)
            {
                return(WindowsLoader.FreeLibrary(handle));
            }
            if (IsLinux)
            {
                if (IsNetCore)
                {
                    return(UnloadLibraryPosix(CoreCLRLoader.dlclose, CoreCLRLoader.dlerror, handle, out errorMsg));
                }
                return(UnloadLibraryPosix(LinuxLoader.dlclose, LinuxLoader.dlerror, handle, out errorMsg));
            }
            if (IsMacOSX)
            {
                return(UnloadLibraryPosix(MacOSXLoader.dlclose, MacOSXLoader.dlerror, handle, out errorMsg));
            }
            throw new InvalidOperationException("Unsupported platform.");
        }