[Mono-list] using a DLL/ActiveX library on a linux webserver

Alex Villací­s Lasso avillaci at fiec.espol.edu.ec
Thu Nov 1 15:48:31 UTC 2012

El 31/10/12 13:10, peterman3 escribió:
> Hi everyone,
> I'm new here and I'm stuck in using a win32 DLL/ActiveX library file that
> does encoding/decoding.
> I have a webserver running PHP on a linux server and I do all my programming
> in PHP.
> I need to find a way to send data to this DLL and get back the response.
> I have sample codes in VC++ & VB, I know a little bit of VC++ and I do not
> have Visual Studio or win32 tools.
> If someone can guide me on what to use to make a either a linux
> executable/fastcgi or a running process where I can just send the data on a
> specific port and get back the results or just running a command like
> "my-prog XXXXX" and get back YYYYY (where XXXX is the string to decode and
> YYYY is the decoded string).
> I would prefer to send/receive JSON data format.
I am assuming you cannot just setup a helper windows (physical or virtual) machine and install PHP in it so you can use native COM with PHP, as described in http://docs.php.net/manual/en/book.com.php .

Hmmm... you do not say if the dll requires .NET. If it does, it should be easy to write a C# program that exposes the dll functionality and run it with mono.

If it does not, it might be possible to do the following:
1) Install win32 tools. Maybe Cygwin on a windows machine, or mingw32 packages on linux. In either case, you need to be able to create a win32 executable.
2) Write and compile a program that uses your dll and exposes the functionality the way you require. Test it on a windows machine.
3) Install Wine on your target machine.
4) Run your program via Wine.

More information about the Mono-list mailing list