.NET 远程处理和 Delphi win32
是否可以(并且可行)将 .NET Remoting 接口与 Delphi win32 应用程序一起使用?
我需要 .NET 应用程序和 Delphi win32 应用程序之间的通信,因此 .NET 远程处理对于管道的另一端来说是本机的。
还有其他解决方案,尽可能接近本机,两端都没有第三方库吗? 每个应用程序将在单独的 Windows 计算机上运行。
Is it possible (and feasible) to use .NET Remoting interface with Delphi win32 application?
I need communication between .NET application and Delphi win32 application, so .NET remoting would be native for other end of the pipe.
Any other solutions, as close to native as possible, for both ends without 3rd party libraries? Applications will be running each on a separate Windows machine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
因为它们运行在不同的机器上,所以应该使用网络通信。 SOAP是一种通用的通信格式,可以轻松地为.Net和Delphi win32制作。 但 SOAP = XML = 慢。
对于我的公司,我们使用 RemObjects SDK 远程处理框架:
http://www.remobjectssdk.com/
非常容易制作界面,生成.Net/代码Delphi/Php/c++/无论什么,也支持 SOAP,但我们使用二进制格式来提高速度(!)。
Because they are running on different machines, you should use a network communication. SOAP is a general communication format, which can be easely made for both .Net and Delphi win32. But SOAP = XML = slow.
For my company we use the RemObjects SDK remoting framework:
http://www.remobjectssdk.com/
Very easy to make an interface, generate code for .Net/Delphi/Php/c++/whatever, also supports SOAP but we use the binary format for speed (!).
Delphi win23和.Net都对COM对象有很好的支持。 这是一个值得一试的选择。
Both Delphi win23 and .Net have good support for COM objects. It's an option worth checking out.
从非 .NET Delphi exe 使用远程处理会非常痛苦。 如果不知道 .NET 应用程序正在运行,那么 COM 互操作将是最简单的答案,因为存在 COM 激活等过程。事实上,存在不同的计算机使事情变得复杂,但 DCOM 存在并且可以工作(我还没有不过,我使用 .NET 和 Delphi 端点对其进行了测试)。
如果 .NET 应用已知正在运行(可能作为服务),您可以考虑一系列替代方案:
HttpListener
at .NET 服务器)ServiceHost
使用 WCF)Using remoting from a non-.NET Delphi exe would be very painful. If the .NET app isn't known to be running, then COM interop would be the easiest answer, since there are processes for COM activation etc. The fact that there are different machines complicates things, but DCOM exists and works (I haven't tested it with .NET and Delphi endpoints, though).
If the .NET app is known to be running (perhaps as a service), you could consider a range of alternatives:
HttpListener
at the .NET server)ServiceHost
at the .NET end)我发现最近关于这个主题的文章有一个解决方案:
http://www.codeproject.com /Articles/852750/NET 和 Delphi-进程间通信-via-Nam
I found recent article about this topic with a solution:
http://www.codeproject.com/Articles/852750/NET-and-Delphi-Inter-Process-Communication-via-Nam
到目前为止,对我来说与任何平台通信的最佳方式是通过套接字。
现在,如果它是内部的,我更喜欢 PIPES 或 MAPPED Memory。
The best way to communicate with any platform so far for me is via Sockets.
Now if it is internal, I prefer PIPES or MAPPED Memory.