nodejs ffi 调用dll
2024-08-26 13:14:01
安装依赖
npm install --global --production windows-build-tools(在管理员权限打开的命令行中执行)
npm install -g node-gyp //依赖python2.7,包含在windows-build-tools中
安装 node-ffi
npm install ffi
安装ref
npm install ref
'use strict';
const path = require('path');
let ffi = require('ffi');
let mydll = path.join(__dirname, '../dll/helloworld.dll');
let dll= ffi.Library(mydll, {
'helloworld': ['int', ['int']]
}); console.log(dll.helloworld(1));//关闭 RLM 通信端口
最新文章
- poj 2503(字符串)
- C# API项目代码正确 ,页面出不来的问题
- linux下wps,系统缺失字体:wingdings、wingdings 2、wingdings3
- item上下自动循环滚动显示
- Codeforces Round #370 (Div. 2)C. Memory and De-Evolution 贪心
- PowerDesigner更改数据库类型
- MySQL监控系统MySQL MTOP的搭建
- sh.status()
- lucene.net 3.0.3、结合盘古分词进行搜索的小例子(转)
- foreach的用法(转)
- C编程的指针涛 ---第十笔记
- 菜鸟Scrum敏捷实践系列(三)用户故事的组织---功能架构的规划
- JUnit 3.8.1 源码学习
- Java IO编程全解(四)——NIO编程
- A1120. Friend Numbers
- stl string的erase方法
- [UE4]Text Box
- asp.net core使用jexus部署在linux无法正确 获取远程ip的解决办法
- windows系统相关命令及问题排查实践
- ZooKeeper与Eureka对比
热门文章
- 笔记-读官方Git教程(1)~认识Git
- c++和cuda混合编程 实现传统神经网络
- 一个简单的setTimeout的问题
- 根据数据文件自定义边界条件timeVaryingUniformFixedValue【转载】
- GO语言html模板
- React.createElement 与 JSX
- input type color
- NTC3950-10K温度传感器
- java查询数据库数据时报错antlr/ANTLRException
- Linux 限制IP——/etc/hosts.allow和/etc/hosts.deny文件【转】