引导Linux使用的Windows DLL [英] Using Windows DLL from Linux
问题描述
我们需要的接口为第三方应用程序,但公司应用的背后并没有透露消息协议,只提供Windows动态链接库接口到。
We need to interface to 3rd party app, but company behind the app doesn't disclose message protocol and provides only Windows DLL to interface to.
我们的应用程序是基于Linux的,所以我不能直接沟通的DLL。我找不到任何现有的解决方案,因此我考虑写Linux和Windows之间基于套接字的桥梁,但我敢肯定它不是这样一个独特的问题,有人应该这样做。
Our application is Linux-based so I cannot directly communicate with DLL. I couldn't find any existing solution so I'm considering writing socket-based bridge between Linux and Windows, however I'm sure it is not such a unique problem and somebody should have done it before.
您知道的任何解决方案,允许调用在Linux上从C应用程序的Windows DDL功能?它可以使用葡萄酒或单独的Windows PC - 不要紧
Are you aware of any solution that allows to call Windows DDL functions from C app on Linux? It can use Wine or separate Windows PC - doesn't matter.
提前非常感谢。
推荐答案
任何解决方案将需要一个基于TCP / IP的远程的DLL之间这是在像Windows的环境中运行层,和您的Linux应用。
Any solution is going to need a TCP/IP-based "remoting" layer between the DLL which is running in a "windows-like" environment, and your linux app.
您需要编写一个简单的PC应用程序来揭露DLL函数,或者使用一个自制的协议,或者XML-RPC,SOAP或JSON的协议。该的RemObjects SDK 可能会帮助你 - 但可能矫枉过正
You'll need to write a simple PC app to expose the DLL functions, either using a homebrew protocol, or maybe XML-RPC, SOAP or JSON protocols. The RemObjects SDK might help you - but could be overkill.
我会坚持以'真正的'或虚拟化的PC。如果您使用葡萄酒,该DLL的开发是不可能提供任何支持。
I'd stick with a 'real' or virtualized PC. If you use Wine, the DLL developers are unlikely to offer any support.
MONO也是不太可能的任何帮助,因为您的DLL可能不是一个.NET程序集。
MONO is also unlikely to be any help, because your DLL is probably NOT a .NET assembly.
这篇关于引导Linux使用的Windows DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!