D
D
Dmitry Avilov2015-03-24 13:18:30
linux
Dmitry Avilov, 2015-03-24 13:18:30

How to get data from dll on linux?

There is a library (dll) compiled under windows. Receives a string as input, returns a string too.
There is a server under centos, on which the node.js service is running, which needs to use this library.
What do you think is the best way to solve the problem? The magic words “wine” and “vps with windows” come to mind, but I don’t want to allocate a separate machine for this business (the library counts a lot of numbers, the current server is quite powerful, and renting a machine of comparable power under windows will cost a pretty penny). And wine, even if you understand how to run something in it, it’s completely incomprehensible how to pull out data from there using node.
In general, we need your advice on which direction to move in and whether it is possible to somehow pull the data directly, without writing interlayers (I understand that the option "we make a web service on a windows server, we access it, it pulls the library" will work , but at the moment it seems complicated, I want to know if there are more elegant solutions).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
polozad, 2015-03-24
@polozad

Mono?

D
Dmitry, 2015-03-24
@EvilsInterrupt

And why it is impossible to lift Windows on VirtualBox?

T
Timur Shemsedinov, 2015-03-24
@MarcusAurelius

It is possible to parse the binary format PE ( Portable Executable ) it is well specified and all DLLs are in this format. For this, the Buffer class https://nodejs.org/api/buffer.html will be useful and there is an article blog.paracode.com/2013/04/24/parsing-binary-data-w... and also the https library : //www.npmjs.com/package/binary-parser to make life easier. Another option is to look for a PE parser for Linux and run it from a node via the command line and then parse its output to the console, this may be easier, but adds dependencies. I would parse myself.

E
Eddy_Em, 2015-03-24
@Eddy_Em

The simplest option is to write the CGI yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question