Electron调用C#动态链接库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const path = require('path')
const edge = require('electron-edge-js')
const dll = path.resolve(__dirname, 'resources/CsharpDLL.dll');
const className = "CsharpDLL.Calc";
var demo = {
add: edge.func({
assemblyFile: dll,
typeName: className,
methodName: 'Invoke'
}),
input: edge.func({
assemblyFile: dll,
typeName: className,
methodName: 'Input'
}),
}
module.exports = demo;