48 references to NativeLibrary
Aspire.Cli.Tests (2)
Agents\AgentConfigurationTestContext.cs (2)
132if (!NativeLibrary.TryLoad("libacl.so.1", out var library)) 136NativeLibrary.Free(library);
Aspire.Tray.Tests (5)
Helpers\LinuxNativeTestSupport.cs (2)
12if (!OperatingSystem.IsLinux() || !NativeLibrary.TryLoad(library, out var handle)) 16NativeLibrary.Free(handle);
src\Aspire.Tray\Linux\Gtk.cs (2)
22NativeLibrary.SetDllImportResolver(typeof(Gtk).Assembly, Resolve); 33if (NativeLibrary.TryLoad(library, assembly, paths, out var handle))
src\Aspire.Tray\Linux\LinuxDesktopEnvironment.cs (1)
91NativeLibrary.TryLoad("libgtk-layer-shell.so.0", out s_library);
crossgen2 (2)
parent\parent\Common\InstructionSetHelpers.cs (2)
111nint libHandle = NativeLibrary.Load(jitInterfaceLibrary, System.Reflection.Assembly.GetExecutingAssembly(), DllImportSearchPath.AssemblyDirectory); 115var getCpuFeatures = (delegate* unmanaged<int>)NativeLibrary.GetExport(libHandle, "JitGetProcessorFeatures");
dotnet-aot (2)
SdkRootLocator.cs (2)
166NativeLibrary.SetDllImportResolver(typeof(SdkRootLocator).Assembly, ResolveDlImport); 183if (NativeLibrary.TryLoad(candidate, assembly, searchPath, out nint handle))
ilc (2)
parent\parent\Common\InstructionSetHelpers.cs (2)
111nint libHandle = NativeLibrary.Load(jitInterfaceLibrary, System.Reflection.Assembly.GetExecutingAssembly(), DllImportSearchPath.AssemblyDirectory); 115var getCpuFeatures = (delegate* unmanaged<int>)NativeLibrary.GetExport(libHandle, "JitGetProcessorFeatures");
ILCompiler.ReadyToRun (4)
parent\parent\Common\JitInterface\JitConfigProvider.cs (4)
60NativeLibrary.SetDllImportResolver(typeof(CorInfoImpl).Assembly, (libName, assembly, searchPath) => 67libHandle = NativeLibrary.Load(jitPath); 71libHandle = NativeLibrary.Load("clrjit_" + GetTargetSpec(target), assembly, searchPath); 76libHandle = NativeLibrary.Load("jitinterface_" + RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant(), assembly, searchPath);
ILCompiler.RyuJit (4)
parent\parent\Common\JitInterface\JitConfigProvider.cs (4)
60NativeLibrary.SetDllImportResolver(typeof(CorInfoImpl).Assembly, (libName, assembly, searchPath) => 67libHandle = NativeLibrary.Load(jitPath); 71libHandle = NativeLibrary.Load("clrjit_" + GetTargetSpec(target), assembly, searchPath); 76libHandle = NativeLibrary.Load("jitinterface_" + RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant(), assembly, searchPath);
Microsoft.DotNet.NativeWrapper (1)
Interop.cs (1)
87if (!NativeLibrary.TryLoad(hostFxrPath, out var handle))
Microsoft.ML.TestFrameworkCommon (5)
Utility\NativeLibrary.cs (5)
5using RuntimeNativeLibrary = System.Runtime.InteropServices.NativeLibrary; 26if (!RuntimeNativeLibrary.TryLoad(name, assembly, null, out var handle) && 27!RuntimeNativeLibrary.TryLoad("lib" + name, assembly, null, out handle) && 28!RuntimeNativeLibrary.TryLoad("lib_" + name, assembly, null, out handle)) 33RuntimeNativeLibrary.Free(handle);
PresentationCore (3)
MS\Internal\Text\TextInterface\DWriteLoader.cs (3)
35NativeLibrary.Free(_dwrite); 53IntPtr hDWriteLibrary = NativeLibrary.Load("dwrite.dll", typeof(DWriteLoader).Assembly, DllImportSearchPath.System32); 57DWriteCreateFactory = (delegate* unmanaged<int, void*, void*, int>)NativeLibrary.GetExport(hDWriteLibrary, "DWriteCreateFactory");
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
130_moduleHandle = NativeLibrary.Load(fileName, Assembly.GetExecutingAssembly(), null);
System.Data.Odbc (2)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Odbc.cs (2)
28NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), (libraryName, assembly, searchPath) => 32return NativeLibrary.Load(GetNativeLibraryName(), assembly, default);
System.DirectoryServices.Protocols (3)
src\runtime\src\libraries\Common\src\Interop\Linux\OpenLdap\Interop.Ldap.cs (3)
84if (NativeLibrary.TryLoad("libldap-2.6.so.0", out IntPtr handle) || 85NativeLibrary.TryLoad("libldap-2.5.so.0", out handle) || 86NativeLibrary.TryLoad("libldap-2.4.so.2", out handle))
System.Net.Quic (5)
System\Net\Quic\Internal\MsQuicApi.cs (5)
110loaded = NativeLibrary.TryLoad(path, typeof(MsQuicApi).Assembly, DllImportSearchPath.LegacyBehavior, out msQuicHandle); 115loaded = NativeLibrary.TryLoad($"{Interop.Libraries.MsQuic}.{s_minMsQuicVersion.Major}", typeof(MsQuicApi).Assembly, null, out msQuicHandle) || 116NativeLibrary.TryLoad(Interop.Libraries.MsQuic, typeof(MsQuicApi).Assembly, null, out msQuicHandle); 130MsQuicOpenVersion = (delegate* unmanaged[Cdecl]<uint, QUIC_API_TABLE**, int>)NativeLibrary.GetExport(msQuicHandle, nameof(MsQuicOpenVersion)); 131MsQuicClose = (delegate* unmanaged[Cdecl]<QUIC_API_TABLE*, void>)NativeLibrary.GetExport(msQuicHandle, nameof(MsQuicClose));
System.Private.CoreLib (5)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (3)
305IntPtr hModule = NativeLibrary.LoadLibraryCallbackStub(moduleName, callingAssembly, hasDllImportSearchPath, dllImportSearchPath); 309NativeLibrary.LoadLibErrorTracker loadLibErrorTracker = default; 311hModule = NativeLibrary.LoadBySearch(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs (1)
91if (!NativeLibrary.TryLoad(library, typeof(object).Assembly, DllImportSearchPath.ApplicationDirectory | DllImportSearchPath.System32, out IntPtr lib) && failOnLoadFailure)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
487return NativeLibrary.Load(unmanagedDllPath);
System.Private.Windows.GdiPlus (1)
Windows\Win32\PInvokeGdiPlus.cs (1)
19NativeLibrary.SetDllImportResolver(Assembly.GetExecutingAssembly(), static (_, _, _) =>
System.Runtime.InteropServices (1)
src\runtime\artifacts\obj\System.Runtime.InteropServices\Release\net12.0\System.Runtime.InteropServices.Forwards.cs (1)
121[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.NativeLibrary))]