最佳IPC的VB6和.NET应用程序应用程序、IPC、NET

2023-09-03 04:35:40 作者:你算个沃特、

在我们的应用程序(文件管理系统),我们都应该以保持两个应用程序在看相同的数据,一个是订单执行的应用程序被通知画面的变化(或通知画面变化的其他程序)外,其他原始传真的文件查看器。应验应用程序是写在VB6和文档管理器是.NET 3.5(C#)。它运行在终端服务器上,因此也必须是会话感知。文档查看器或履行程序可能打开第一,两者都可以没有其他可以使用。什么是IPC的最佳方法是什么?

In our application (a document management system) we are supposed to be notified of screen changes (or notify the other program of screen changes) in order to keep the two applications looking at the same data, one being the order fulfillment app, the other the document viewer of the original fax. The fulfillment app is written in vb6 and the document manager is in .net 3.5 (c#). It runs on a terminal server so it also has to be session aware. The document viewer or the fulfillment app may be open first and both can be used without the other. What would be the best method of IPC?

推荐答案

如果您希望能够在Vista或Windows 7上运行,工控机的最佳状态将是TCP(这是从VB6做很容易与Winsock控件)。

If you want to be able to run on Vista or Windows 7, the best form of IPC is going to be TCP (which is done very easily from VB6 with the Winsock control).

这样做的好处是,两个应用程序可以沟通,即使他们没有运行相同的用户,他们可以沟通(你不能做到这一点与SendMessage函数或在Vista +命名管道)。你要记得做的唯一的事情,被设置在防火墙的规则,因此它不会被封锁。这可以在安装程序进行搭配:

The advantage of this is that two apps can communicate even if they aren't running as the same user, they can communicate (you can't do that with SendMessage or Named Pipes under Vista+). The only thing you have to remember to do, is set a rule in the firewall so it doesn't get blocked. This can be done in your installer with:

netsh.exe firewall set allowedprogram "{PROGRAM PATH}" "{PROGRAM NAME}" enable