从Linux使用Windows DLL [英] Using Windows DLL from Linux

查看:573
本文介绍了从Linux使用Windows DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要连接到第三方应用程序,但应用程序后面的公司并没有透露消息协议,只提供Windows DLL以进行接口。

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功能的解决方案?它可以使用Wine或单独的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的远程处理层,在Windows环境中运行的DLL和您的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。如果您使用Wine,那么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屋!

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