如何在CEdit中设置字符串 [英] how to set a string in the CEdit

查看:114
本文介绍了如何在CEdit中设置字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过其他过程填充控制器.

可以找到该句柄,但是当我调用SendMessage()时这是错误的.

谁可以帮助我?

I want to fill the controller by an other process.

The handle can be found, but it is wrong when I call SendMessage().

Who can help me?

推荐答案

我的主意不好.进程是孤立的,您正在尝试打破它.通过Windows手柄进行的通信是Windows系统独有的过时功能,该功能不能移植到任何其他系统中,这源于Windows操作系统之前的版本以及尚未使用英特尔保护模式CPU架构的Windows版本.使用它通常是不好的.进程间通信的正确方法是进程间通信IPC :
http://en.wikipedia.org/wiki/Inter-process_communication [
Bad idea, I would say. The processes are isolated, and you are trying to break it. Communication via the Windows handles is obsolete feature unique for Windows systems, not portable to any others, stemmed from the versions of Windows before it was an OS and when Intel protected mode CPU architecture was not yet used. Using it is generally bad. The proper way of inter-process communication is, well Inter-Process Communication, IPC:
http://en.wikipedia.org/wiki/Inter-process_communication[^].

If a process is some application with not accessible source code or an API (so you cannot make it an in-proc plug-in or something working in your process) and it is not designed to use any kind of IPC — then no luck. Before thinking of dirty tricks of using Windows handle manipulation, I would think really hard if the integration of it can really be justified, usually not.

—SA


这篇关于如何在CEdit中设置字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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