C#调用WIN API

//1.声明API函数所在的DLL 及函数与参数。
[DllImport("user32.dll", EntryPoint = "GetWindow", SetLastError = true,
CharSet = CharSet.Unicode, ExactSpelling = true,
CallingConvention = CallingConvention.StdCall)]
//2.声明API函数一个空方法,在以后的使用中就可以直接调用了。

public static extern int GetWindow(int hwnd, int wCmd);

posted @ 2012-11-16 11:55  前方辉煌  阅读(213)  评论(0)    收藏  举报