Communication between C# DLLExport function and UE4 strings problem

Calling a C# function directly from C++ is impossible. C# functions are written using CIL bytecode and placed inside an assembly which is a file format specific to C# and other .NET languages. Those functions can only be run using a C# runtime like .NET or Mono. While assemblies are normally given .exe or .dll file extensions, they are not the same.

As for what you’re doing now with C++. Instead of trying to manually look up the function for each call, which would slow your function down by several orders of magnitude, you should just reference your DLL’s library and headers directly.

You’ll need to find a tutorial that explains how static or dynamic linking occurs when it comes to C++.