平台调用

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());
原文地址:https://www.cnblogs.com/wangjixianyun/p/3156494.html