Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryLoad() [1/2]

static bool System.Runtime.InteropServices.NativeLibrary.TryLoad ( string libraryName,
Assembly assembly,
DllImportSearchPath? searchPath,
out IntPtr handle )
inlinestatic

Definition at line 65 of file NativeLibrary.cs.

66 {
67 if (libraryName == null)
68 {
69 throw new ArgumentNullException("libraryName");
70 }
71 if (assembly == null)
72 {
73 throw new ArgumentNullException("assembly");
74 }
75 if (!assembly.IsRuntimeImplemented())
76 {
77 throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
78 }
79 handle = LoadLibraryByName(libraryName, assembly, searchPath, throwOnError: false);
80 return handle != IntPtr.Zero;
81 }
static IntPtr LoadLibraryByName(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, bool throwOnError)

References System.SR.Argument_MustBeRuntimeAssembly, System.handle, System.Reflection.Assembly.IsRuntimeImplemented(), System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(), and System.IntPtr.Zero.