1.C#编译的程序,可以在任何安装了.net运行环境的系统中运行,将来甚至可能可以运行在linux中;这个运行库大概16M左右。
2.假如你的sample.dll中有名为sample这个导出函数:
可以这样在你的C#代码中声明:
…………
[DllImport("sample.dll", EntryPoint="sample",  SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern ReturnType sample(paramlist);
………………