class DaemonPlugin
{
[DllExport("add",CallingConvention = CallingConvention.Cdecl)]
public static int add(int left, int right)
{
return left + right;
}
}
Then write a C++ wrapper around the exported classes. I don't think C# will be able to handle the pointers from the MySQL plugin API (or to do so would be tremendously cumbersome) so a wrapper around the .NET exported .NET code which handles the C memory management, etc, needed for a plugin will work best.
I don't know much about this. I learned the above from a few google searches, but hopefully it will get you going in the right direction.
Regards,
--Justin