in JetBrains.Profiler.UnityApi/src/Impl/Windows/NativeLibrary.cs [17:25]
public TDelegate GetNativeFunction<TDelegate>(string functionName) where TDelegate : Delegate
{
var ptr = Kernel32Dll.GetProcAddress(myHandle, functionName);
if (ptr == IntPtr.Zero)
throw new EntryPointNotFoundException("Failed to get a function entry point " + functionName);
#pragma warning disable CS0618
return (TDelegate)Marshal.GetDelegateForFunctionPointer(ptr, typeof(TDelegate));
#pragma warning restore CS0618
}