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

◆ GetFunctionPointer()

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

Definition at line 72 of file ComponentActivator.cs.

73 {
74 if (!IsSupported)
75 {
76 return -2147450713;
77 }
78 try
79 {
80 string typeName = MarshalToString(typeNameNative, "typeNameNative");
81 string methodName = MarshalToString(methodNameNative, "methodNameNative");
82 if (loadContext != IntPtr.Zero)
83 {
84 throw new ArgumentOutOfRangeException("loadContext");
85 }
86 if (reserved != IntPtr.Zero)
87 {
88 throw new ArgumentOutOfRangeException("reserved");
89 }
91 {
92 throw new ArgumentNullException("functionHandle");
93 }
95 }
96 catch (Exception ex)
97 {
98 return ex.HResult;
99 }
100 return 0;
101 }
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 System.Runtime.Loader.AssemblyLoadContext.Default, Internal.Runtime.InteropServices.ComponentActivator.InternalGetFunctionPointer(), Internal.Runtime.InteropServices.ComponentActivator.IsSupported, Internal.Runtime.InteropServices.ComponentActivator.MarshalToString(), and System.IntPtr.Zero.