Expose COM object to an application running in Wine/Linux
Only one Windows application is troubling me before I开发者_JAVA技巧 can fully move to Linux. It's a stock charting application (couldn't find any decent one native to Linux) that I'm running using Wine.
This application has its own language and it allows the user to create objects from COM components to implement external functions. In Windows, I created a program using Mono that exposes certain functions that allow me to interact with the charting software.
Example:
myObj = CreateObject("myApp.application");
myObj.data = Price;
volatility = myObj.Volatility;
Question: How could I expose the ComVisible
components of "myApp" which is running in the Linux environment under Mono runtime to the charting software running in Wine?
Unfortunately, mono and wine have no particular integration, and so you can't directly invoke Wine-hosted code in Mono.
One option would be to use Microsoft's .NET 2.0 framework in Wine. Only up to 2.0 is supported well. This may or may not be a violation of the .NET license.
Another option would be to write a custom proxy using winelib that runs in wine, but listens on a unix domain socket for commands from your mono program.
Another option would be to write the (rather complex) code needed to get mono to talk to wine over DCOM. This would be rather difficult, but would benefit anyone down the line who wants to get COM objects working in mono.
You should be able to install the Windows version of Mono under Wine and run your code in that.
精彩评论