WinAPI 旺旺自动发送消息 FindWindow/SendMessage
时间:2011-04-11 来源:卡门网
通过WinAPI自带的FindWindow、FindWindowEx找到消息窗口,然后
通过SendMessage写/发送消息。辅助工具SPY++(VS2008自带)
弹出信息窗口方式IE:
阿里旺旺:aliim:sendmsg?uid=cntaobao发送者帐号&touid=cntaobao接收者帐号
WinAPI 调用:
[DllImport("User32.dll", EntryPoint = "FindWindow")]
private static extern IntPtr FindWindow(string lpClassName,string lpWindowName);
[DllImport("User32.dll", EntryPoint = "FindWindowEx")]
private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpClassName, string lpWindowName);
[DllImport("User32.DLL")]
public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, string lParam);
DEMO:
下载地址:http://jindouyun.kamenwang.com
相关阅读 更多 +