avatar
文章
83
标签
0
分类
0

Hexo

Hexo

windows 5 进程间通信
发表于2024-07-07
进程间通信发送消息一般是自定义消息,使用SendMessage发送 新建项目 123456#define MS_TEST WM_USER+1 //自定义消息void CA1Dlg::OnBnClickedButton1(){ HWND hWndB = ::FindWindow(NULL, "B1"); ::SendMessage(hWndB, MS_TEST, 0x12456789, 0x98745612);} 添加自定义消息,确定后点击编辑代码 1234567afx_msg LRESULT CB1Dlg::OnMsTest(WPARAM wParam, LPARAM lParam){ CString strFmt; strFmt.Format("w:%08x,l:%08x", wParam, lParam); AfxMessageBox(strFmt); return 0;} 在头文件处要添加定义 在B1初始化处要给窗口添加名字 123456789101112 ...
windows 4 跨进程使用句柄、操作内存
发表于2024-07-07
跨进程使用句柄 A进程拿到句柄,把值给B进程,B进程能不能直接使用? 继承方式创建MFC应用 新建按钮 使用多字节字符集 新建编辑框,修改ID 1234567891011121314151617181920212223242526272829303132333435void CADlg::OnBnClickedButton1(){ // TODO: 在此添加控件通知处理程序代码 STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); ZeroMemory(&pi, sizeof(pi)); SECURITY_ATTRIBUTES sa = {}; sa.nLength = sizeof(sa); sa.bInheritHandle = TRUE;//进程句柄允许被继承 //Start the child process. if (!CreateProcess(NULL, "B. ...
Hello World
发表于2024-07-06
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
1…89
avatar
Miyabi
文章
83
标签
0
分类
0
Follow Me
公告
This is my Blog
最新文章
C 2 string容器2025-09-14
C 1 STL初识2025-09-14
Python 12 面向对象2025-09-09
Python 11 Python基础综合案例-动态柱状图2025-09-01
Python 10 Python基础综合案例-地图可视化2025-08-21
归档
  • 九月 20254
  • 八月 20252
  • 七月 20252
  • 六月 20252
  • 五月 20252
  • 四月 20252
  • 三月 20253
  • 二月 20258
网站资讯
文章数目 :
83
本站访客数 :
本站总访问量 :
最后更新时间 :
©2020 - 2025 By Miyabi
框架 Hexo|主题 Butterfly