如何在两个进程之间发送消息? [英] How do I send message between two processes?

查看:328
本文介绍了如何在两个进程之间发送消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的VC ++代码中,



两个进程之间的SendMessage()是否可能不使用共享内存或套接字?



例如,



A.exe向正在运行背景的B.exe发送消息。



提前谢谢。



我尝试过:



此程序浪费超过2天....

In my VC++ code,

Is it possible SendMessage() between two processes not using shared memory or socket?

For example,

A.exe send a message to B.exe which is running background.

Thank you in advance.

What I have tried:

More than 2 days wasted for this program....

推荐答案



使用WM_COPYDATA参数搜索解决方案发送消息。

在此您可以找到解决方案的开头:

https://stackoverflow.com/questions/2451103/use- wm-copydata-to-send-data-between-processes

祝你好运
Hi,
Search solution using WM_COPYDATA parameter to send message.
Here you can find the start of the solution:
https://stackoverflow.com/questions/2451103/use-wm-copydata-to-send-data-between-processes
Best regards


SendMessage 函数传递第一个参数作为第二个过程的句柄。

请参阅链接了解更多详情 - > 向另一个主框架窗口发送消息申请,仅给出流程处理 [ ^ ]
In SendMessage function pass first parameter as handle of second process.
Please refer link for more details -> Sending a message to the Main Frame Window of Another Application, given only the Process Handle[^]


这篇关于如何在两个进程之间发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆