将ActiveX Com组件与nodejs一起使用。可能吗 [英] Using ActiveX Com Components with nodejs. Is it possible

查看:307
本文介绍了将ActiveX Com组件与nodejs一起使用。可能吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将任何ActiveX com组件与nodejs一起使用?



实际上,我永远不需要它,但是我在Windows上运行nodejs并尝试发送



由于存在一些Activex组件用于发送带有原始套接字的ping请求,因此我可以使用它们。

/ p>




如何使用JavaScript创建COM对象的示例如下:

  var rs = new ActiveXObject( ADODB.Recordset); 


解决方案

(已更新)



您可以尝试使用node-ffi绑定到Win32并启动COM / ActiveX组件(CoCreateInstance)或直接访问winsock / icmp。参见 https://github.com/rbranson/node-ffi



或尝试通过WMI进行ping操作,例如从win32_pingstatus中选择*,其中Address ='...’。。参见 https://npmjs.org/package/wmi


Is there a way to use any ActiveX com components with nodejs?

Actually, I would never need this but I'm running nodejs on Windows and trying to send ping requests without forking new processes (no such module exists for Windows).

As some Activex components exist for sending ping requests with raw sockets, maybe I can use them.


An example of how you can create a COM object from JavaScript is:

var rs = new ActiveXObject("ADODB.Recordset");

解决方案

(updated)

You could try to use node-ffi to bind to Win32 and launch a COM/ActiveX component (CoCreateInstance) or access winsock/icmp directly. See https://github.com/rbranson/node-ffi

Or try to ping via WMI, e.g. "select * from win32_pingstatus where Address='...'". See https://npmjs.org/package/wmi

这篇关于将ActiveX Com组件与nodejs一起使用。可能吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆