2021-05-20 electron wacom

electron wintab

node-gyp  、python2.7

1.  cnpm install electron@10.1.3

     cnpm install trtc-electron-sdk@latest --

2 npm install ffi-napi 出错,再装

3. npm install ref-napi       

4.npm start 出错  npm cnpm install electron@10.1.3

5.开始卡 ?怎么解决ipc  同步返回值?

 

 

 

main:

  win.hookWindowMessage(0x7FF0, function msg_callback (wParam ,lParam ) {

      win.send('WT_PACKET', wParam)

  })

 

modtab:

const myWintab32 = new ffi.Library('Wintab32', {

      'WTInfoW': 

      ['uint', ['uint', 'uint', 'pointer']],//LOGCONTEXTWptr

      //UINT API WTInfoW(UINT, UINT, LPVOID);

      'WTOpenW': 

      ['uint', ['uint','pointer', 'int']],//LOGCONTEXTWptr

      //HCTX API WTOpenW(HWND, LPLOGCONTEXTW, BOOL);

      'WTPacketsGet': 

      ['int', ['uint','int', 'pointer']],

     // int API WTPacketsGet(HCTX, int, LPVOID);

 

});

 

 

 

 

 

1 buffer  node  js 两个 用的是node的buffer

2

const ffi = require('ffi-napi');

const ref = require('ref-napi')

//var StructType = require('ref-struct-di')(ref)

//var ArrayType = require('ref-array-di')(ref)

//const { ipcRenderer } = require('electron')

3 不用 struct-di  ,直接pointer硬解

Node.js 使用 FFI 调用 win32 API

http://blog.mangege.com/tech/2019/12/26/1.html

 

Electron9.x +vue+ffi-napi 调用Dll动态链接库

https://www.jianshu.com/p/dd9463dead8c

 

ref-napi

https://www.npmjs.com/package/ref-napi

 

electron教程(三): 使用ffi-napi引入C++的dll

https://www.cnblogs.com/silenzio/p/11606389.html

node-ffi-napi

https://github.com/node-ffi-napi

 

nodejs/node-gyp

https://github.com/nodejs/node-gyp#installation

C++ 插件

http://nodejs.cn/api/addons.html

 

wacom doc

https://developer-docs.wacom.com/intuos-cintiq-business-tablets/docs/wintab-reference

 

Wacom-Developer/wacom-device-kit-windows

https://github.com/Wacom-Developer/wacom-device-kit-windows

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值