使用C ++ DLL / API将数据从一个应用程序传递到另一个应用程序 [英] Pass data from one application to another using C++ DLL/API

查看:120
本文介绍了使用C ++ DLL / API将数据从一个应用程序传递到另一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设应用程序X规定通过其API访问其各种组件(例如参考X的API )。



然后我们有另一个应用程序Y,它允许用户构建插件或DLL(例如AB的ADK指南



目标:建立X和Y之间的通信使他们可以互相交流并交换数据 - 大多数是从X到Y的一种方式。



我是什么尝试过:



说到DLLs / API,我总是一个菜鸟。我的C ++知识仅限于高中编程基础。你能不能给我一些建议或推荐一些书。



谢谢!

Let's say an application "X" provisions access to its various components by its APIs (for e.g. Reference to X's APIs).

Then we have another application "Y" which allows user to built Plugins or DLLs (for e.g. AB's ADK Guide).

Objective: Establish communication between "X" and "Y" such that they could talk to each other and exchange data - mostly one way from X to Y.

What I have tried:

I am a total noob when it comes to DLLs/APIs. My C++ knowledge is limited to High School programming basics only. Could you kindly give me some advice or refer some books.

Thank You!

推荐答案

其中一个您在案例中跨应用程序共享数据的解决方案可能是共享数据段



https://www.codeproject.com/Articles/240/How-to -share-a-data-in-a-DLL



可以有一些本地读写器组件可以检查何时在共享数据段中更新数据由谁来支付。



其他解决方案可以使用共享内存,命名管道,外部文件,套接字等。
One of the solution in your case for sharing data across apps could be "Shared data segment"

https://www.codeproject.com/Articles/240/How-to-share-a-data-segment-in-a-DLL

There can be some local reader writer components which can check when data is updated in shared data segment and by whom.

Other solution could be use shared memory, named pipe, external files, socket etc.


这篇关于使用C ++ DLL / API将数据从一个应用程序传递到另一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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