| 75 | } |
| 76 | |
| 77 | [UnmanagedCallersOnly] |
| 78 | public static unsafe nint GetFunctionPointer(char* InAssemblyName, char* InTypeName, char* InMethodName) |
| 79 | { |
| 80 | if (AssemblyLoader.CurrentContext != null) |
| 81 | { |
| 82 | var Type = GetTypeImplementation(AssemblyLoader.CurrentContext.Assemblies, |
| 83 | new string(InAssemblyName), new string(InTypeName)); |
| 84 | |
| 85 | if (Type != null) |
| 86 | { |
| 87 | var Method = Type.GetMethod(new string(InMethodName), |
| 88 | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); |
| 89 | |
| 90 | if (Method != null) |
| 91 | { |
| 92 | return Method.MethodHandle.GetFunctionPointer(); |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | return 0; |
| 98 | } |
| 99 | |
| 100 | [UnmanagedCallersOnly] |
| 101 | public static unsafe int GetNamespace(nint InHandle, byte* OutString, int InStringSize) |