从另一个应用程序读取数据
如何从另一个窗口的应用程序读取数据?
根据 Spy++,另一个应用程序有 TG70.ApexGridOleDB32。它有 3 列和几行。我需要从我正在编写的另一个应用程序中读取这些数据。有人可以帮助我吗?
我正在用 MFC/C++ 编写代码
How do I read data from another window's application?
The other application has a TG70.ApexGridOleDB32 according to Spy++. It has 3 columns and a few rows. I need to read this data from another application I am writing. Can someone help me?
I am writing the code in MFC/C++
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
操作系统不允许直接从不同的应用程序/进程读取数据。如果您的“应用程序”是主应用程序的子进程,您可以使用共享对象来来回传递数据。
但是,就您而言,最合适的方法似乎是将数据转储到磁盘上。假设您有应用程序 A 和 B。B 可以生成数据并将这些数据推送到常规文件或数据库中。然后 A 可以访问文件/数据库以继续。请注意,由于执行的 I/O 数量巨大,这将是一个非常昂贵的实现。
因此,如果您的应用程序生成大量数据,那么将两个应用程序都设置为线程将是最佳选择。
Operating systems donot allow directly reading data from different applications/processes. In case your "application" is a sub-process of main application, you can use shared objects to pass data to and fro.
However, in your case, it seems like the most appropriate would be to dump your data on disk. Suppose you have applications A and B. So B can generate the data and push this data onto a regular file or a database. Then A can access the file/database to proceed. Note that this will be a very costly implementation because of sheer number of I/Os performed.
So if your application is generating a lot of data, making both the applications as threads would be the way to go.