[ Late reply, but this may help others
]
Well, I think that should not be too difficult. You can use DllImport.
Say you have the following C++ func in a dll :
Code: c++
// int Sum (int, int) inside MyDll.dll
int Sum(int x, int y)
{ return x + y; }
and you want to use it in your C# app.
So, you can use it like this :
Code: c#
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices; //For "DllImport"
namespace MyCSharp
{
class Program
{
[DllImport("MathFuncsDll.dll", CharSet = CharSet.Auto)]
public static extern Int32 Sum(Int32 a, Int32 b);
static void Main()
{
Console.WriteLine(Sum(3, 4));
}
}
}
Simple, isn't it ?
PS : Just embed a manifest to avoid the error : "An application has made an attempt to load the C Runtime library without using a manifest."