开发者

Can you call COM components from server side javascript?

开发者 https://www.devze.com 2023-02-12 07:11 出处:网络
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

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?


There is node-win32ole (npm install win32ole).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消