Nodejs integration with DLL

Asked

Viewed 861 times

-2

I need to make Nodejs read a DLL to create a Rest API.

I have the file . dll, but I don’t have the source code, this . dll is in a Chinese C# program. What I want is to use this . dll by creating a Rest API with Nodejs, and do the front end in Reactjs.

Is it possible to do? Is there anyone who’s ever done?

I’ve read around, but the articles I found mentioned changes in the archives. dll for nodejs to be able to call, but as I mentioned, I don’t have the source code.

Thank you in advance. I am available to clarify further details if necessary.

  • 1

    I suggest you study the library Edge of NodeJS.

  • Thanks Igor, I’ll study that lib.

1 answer

3

There is a lib called Edge. In its documentation it guides how to perform a DLL function.

var hello = require('edge').func({
    assemblyFile: 'My.Edge.Samples.dll',
    typeName: 'Samples.FooBar.MyType',
    methodName: 'MyMethod' // Func<object,Task<object>>
}});

hello('Node.js', function (error, result) { ... });

Follow the library page: Edge

  • Thanks Fredson. ?

  • No. According to the documentation, you just need to know what method name you should call.

  • Show... I will study her here. thank you very much. Anything I will post the result here of conclusion

Browser other questions tagged

You are not signed in. Login or sign up in order to post.