设计帮助:使用什么进程间通信? [英] Design Help: What interprocess communication to use?

查看:64
本文介绍了设计帮助:使用什么进程间通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是Windows开发的新手,目前我正在努力更新一些用WinAPI C编写的非常旧的代码。 


目前,我们使用DDE进行进程间通信,但是希望更新它。   


问题是什么是最好的方式?


采用这个非常简单的用例:


应用程序是用直接C编写的,并且有一个全局字符串。  在应用程序中,存在2个函数--setString()和getString()。  我想将此应用程序用作服务器(进程外独立扩展),以便我可以编写
另一个可以利用这两个功能并在第一个应用程序中修改数据的应用程序。  这两款应用都会立即投放。


 我已经广泛阅读了COM并发现它非常令人费解和混乱(我已经阅读了一本书大约一周了我很困惑)。  理想情况下,我想在遗留代码周围编写某种.NET包装器,因此它成为
托管代码,并且可以利用.NET的进程间功能。  我也被推荐过WCF和ATL。  从这里开始的最佳方式是什么? 


 


感谢您的输入!

解决方案

你好!


也许你应该看看命名管道?


http ://msdn.microsoft.com/en-us/library/ms733769.aspx


Hi All,

I am very new to windows development, and am currently working to update some very old code written in straight WinAPI C.  

Currently, we use DDE for interprocess communications, but are looking to update this.   

The question is what is the best way?

Take this very simple use case:

The application is written in straight C and has a global string.  within the application, 2 functions exist- setString() and getString().  I would like to use this application as a server (out of process stand alone extension) so that I can write another app that can utilize these 2 functions and modify the data within the first application.  Both apps will be running at once.

 I have read extensively into COM and find it very convoluted and confusing (I've been reading a book on it for about a week and am thoroughly confused).  Ideally, I would like to write some kind of .NET wrapper around the legacy code so it becomes managed code and can utilize the interprocess functionalities of .NET.  I have also been recommended WCF and ATL.  What is the best way to proceed from here? 

 

Thanks for the input!

解决方案

Hello!

Maybe you should look at named pipe?

http://msdn.microsoft.com/en-us/library/ms733769.aspx


这篇关于设计帮助:使用什么进程间通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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