平台调用

http://www.pinvoke.net/

封装好的类库vs插件


[DllImport("user32.dll")]
public static extern int SetCursorPos(int x, int y);

 

[DllImport("user32.dll", EntryPoint="GetWindowText")]
public static extern int GetWindowText (
int hwnd,
string lpString,
int cch
);
调用:
StringBuilder s = new StringBuilder(512);
int i = GetWindowText(this.Handle, s, s.Capacity);
MessageBox.Show(s.ToString());
posted @ 2013-06-26 13:59  fff8965  阅读(224)  评论(0编辑  收藏  举报