<p>How can I call a C++ function from C# .NET?</p>

compile the C++ function into a dll and
use P/Invoke
or
compile the C++ function into a C++/CLI assembly, wrap in a managed C++ class, and then treat like any other assembly (add a reference, use a using statement and call the class)