[DllImport("user32.dll(也可能是其他的dll,甚至是你自己做的c++ dll)", EntryPoint="api函数")]
public static extern int api函数( 参数列表);
然后在其他地方,就可以引用这个函数了,就好像是一个普通的外部函数一样!
记得最上面添加
using System.Runtime.InteropServices;
using System.Text;
不然识别不聊dllimport方法,也不能识别stringbuilder类!
_____________________________________________________________
dword用int类型代替,其他几个应该都换成string类型,最后一个用stringbuilder类!