Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have some third party .net dlls that do some specific work. These dlls are compiled and shipped with the application that is installed on the server where node.js server will be running. These dlls are provided as an extension to the software and are like "API".

I am not an expert in node.js but from what i understand is that i cannot call .net dlls from node.js server script file. It has to be c++ code. I know there is a module called Edge.js which i can use do the same. Please correct me if i am wrong.

is it possible to write a wrapper in c++ and call these .net methods?

I did some research and found this article on Microsoft website: Calling A .NET Managed Method from Native Code I have not tried it but i would like to know if it is possible to do so?

Right now i have written WebAPI methods but this makes me run two web servers. One to host WebAPI and one node server.

share|improve this question

1 Answer

Personally, I think you're current solution is the best as it's going to be more stable and it already works.

Calling .NET methods from native code is not trivial. Keep in mind that this involves loading the .NET runtime INTO the node process You then have the fun of marshalling all the various data formats from .NET to native node/javascript etc... This seems to be what edge.js does. So if you are going to run things in the same process, use edge.js.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.