2

Node.js applications and Win32 binaries are two different worlds.

I am wondering if there are ways to access any Node.js libraries or functions directly from a Win32 process (in-process invocation)?

This following question shall work by refering to How can I use a C++ library from node.js?

Similarly, is it possible for Node.js application to invoke functions exported from Windows DLLs?

Community
  • 1
  • 1
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
  • Possible duplicate of [How can I use a C++ library from node.js?](http://stackoverflow.com/questions/9629677/how-can-i-use-a-c-library-from-node-js) – CodeCaster Mar 18 '16 at 10:29
  • 1
    The other way around, you'll have to have a way to host a Node runtime from an arbitrary runtime on an arbitrary platform and marshalling arbitrary variable types, I don't know whether that exists. Maybe through [Owin](https://tomasz.janczuk.org/2013/02/hosting-net-code-in-nodejs-applications.html). – CodeCaster Mar 18 '16 at 10:31
  • 1
    You can write a Windows Store application using JavaScript, and make native system calls available through Windows Runtime components (see [Walkthrough: Creating a basic Windows Runtime component in C++ and calling it from JavaScript or C#](https://msdn.microsoft.com/en-us/windows/uwp/winrt-components/walkthrough-creating-a-basic-windows-runtime-component-in-cpp-and-calling-it-from-javascript-or-csharp)). For a Windows Desktop application you will have to host the JavaScript runtime environment yourself. – IInspectable Mar 18 '16 at 10:53

0 Answers0