如何跨进程发送字符串?(收藏)

来源:互联网 发布:c 定义json对象数组 编辑:程序博客网 时间:2024/05/21 21:02
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

如何跨进程发送字符串

问题描述:

如何跨进程发送字符串

解决方案:

参考:

http://blog.csdn.net/wu_07/archive/2004/11/26/194814.aspx

 

http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=205761

 

个人:

有两种办法:

一是向目标对象发送wm_settext消息

参考:

http://www.ttian.net/article/show.php?id=132

http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=204580

http://www.vchelp.net/itbookreview/view_paper.asp?paper_id=1198

http://dev.csdn.net/article/58/58647.shtm

http://dev.19xz.com/soft/60230.htm

 

二是先将要发送的内容复制到剪贴板,再向目标对象发送wm_paste消息

http://www.blogcup.com/read_yang119345_5312.html

http://www.zdnet.com.cn/developer/code/story/0,2000081534,39156949,00.htm

 

两种方法都必须首先用FindWindowEx等函数首先枚举到目标对象的句柄,下面操作就简单了。

 
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击