最佳IPC的VB6和.NET应用程序 [英] Best IPC for VB6 and .net application

查看:217
本文介绍了最佳IPC的VB6和.NET应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的应用程序(文件管理系统),我们都应该以保持两个应用程序在看相同的数据,一个是订单执行的应用程序被通知画面的变化(或通知画面变化的其他程序)外,其他原始传真的文件查看器。应验应用程序是写在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

这篇关于最佳IPC的VB6和.NET应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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