Is it possible (using one of the server side implementations of javascript .. see http://www.nakedjavascript.com/getting-started-55) to instantiate a COM object and invoke methods on it?
Asked
Active
Viewed 2,563 times
2
-
I'm most interested in a v8 solution – Nigel Thorne Feb 22 '11 at 09:43
2 Answers
1
That depends on which server-side implementation you’re using.
When using ASP/JS (or any other framework using Microsoft’s Windows Scripting engine), that’s not a problem using the ActiveXObject constructor.
When using JSDB, you can use the ActiveX constructor.
Node.js doesn’t really work on Windows, only thru Cygwin, so ActiveX probably won’t be supported.
I have no idea how easy or difficult it would be to access COM objects from SpiderMonkey, V8 or SquirrelFish directly. They have C/C++ interfaces — and are open source, so if you know your way in the language, you could probably add it.

Martijn
- 13,225
- 3
- 48
- 58
-
Thanks for the prompt response. I guess I could wrap COM using something like https://github.com/tsa/vu8 . I have no idea how much work that would be. What interfaces would you need as a minimum? I guess ruby's win32ole.c could be a good place to starthttp://www.ruby-doc.org/stdlib/libdoc/win32ole/rdoc/ – Nigel Thorne Feb 22 '11 at 09:44
-
Also, I don’t know if .Net is an option, but in that case you should check out [this question](http://stackoverflow.com/questions/356948/referencing-googles-v8-engine-from-a-net-app). – Martijn Feb 22 '11 at 09:53