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

◆ LoadAssemblyAndGetFunctionPointer()

static unsafe int Internal.Runtime.InteropServices.ComponentActivator.LoadAssemblyAndGetFunctionPointer ( IntPtr assemblyPathNative,
IntPtr typeNameNative,
IntPtr methodNameNative,
IntPtr delegateTypeNative,
IntPtr reserved,
IntPtr functionHandle )
inlinestatic

Definition at line 42 of file ComponentActivator.cs.

43 {
44 if (!IsSupported)
45 {
46 return -2147450713;
47 }
48 try
49 {
50 string assemblyPath = MarshalToString(assemblyPathNative, "assemblyPathNative");
51 string typeName = MarshalToString(typeNameNative, "typeNameNative");
52 string methodName = MarshalToString(methodNameNative, "methodNameNative");
53 if (reserved != IntPtr.Zero)
54 {
55 throw new ArgumentOutOfRangeException("reserved");
56 }
58 {
59 throw new ArgumentNullException("functionHandle");
60 }
63 }
64 catch (Exception ex)
65 {
66 return ex.HResult;
67 }
68 return 0;
69 }
static IsolatedComponentLoadContext GetIsolatedComponentLoadContext(string assemblyPath)
static IntPtr InternalGetFunctionPointer(AssemblyLoadContext alc, string typeName, string methodName, IntPtr delegateTypeNative)
static string MarshalToString(IntPtr arg, string argName)
static readonly IntPtr Zero
Definition IntPtr.cs:18

References Internal.Runtime.InteropServices.ComponentActivator.GetIsolatedComponentLoadContext(), Internal.Runtime.InteropServices.ComponentActivator.InternalGetFunctionPointer(), Internal.Runtime.InteropServices.ComponentActivator.IsSupported, Internal.Runtime.InteropServices.ComponentActivator.MarshalToString(), and System.IntPtr.Zero.