dlldemo 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/add.dll +0 -0
- package/index.js +23 -0
- package/npminstall-debug.log +195 -0
- package/package.json +16 -0
package/add.dll
ADDED
Binary file
|
package/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: luoxin 936074788@qq.com
|
3
|
+
* @Date: 2024-01-24 15:52:24
|
4
|
+
* @LastEditors: luoxin 936074788@qq.com
|
5
|
+
* @LastEditTime: 2024-01-25 17:10:39
|
6
|
+
* @FilePath: \npmdemo\index.js
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
8
|
+
*/
|
9
|
+
const ffi = require('ffi-napi');
|
10
|
+
const path = require('path')
|
11
|
+
// 加载C# DLL文件
|
12
|
+
var libm = ffi.Library('./add.dll', {
|
13
|
+
'Add': [
|
14
|
+
'int', // 对应 C函数返回类型
|
15
|
+
['int', 'int'] // C函数参数列表
|
16
|
+
],
|
17
|
+
});
|
18
|
+
function callMyFunction(a, b) {
|
19
|
+
const result = libm.Add(a, b);
|
20
|
+
console.log(result);
|
21
|
+
}
|
22
|
+
|
23
|
+
module.exports = callMyFunction;
|
@@ -0,0 +1,195 @@
|
|
1
|
+
{
|
2
|
+
root: 'C:\\Users\\Administrator\\Desktop\\app\\npmdemo',
|
3
|
+
registry: 'https://registry.npmmirror.com',
|
4
|
+
pkgs: [],
|
5
|
+
production: false,
|
6
|
+
cacheStrict: false,
|
7
|
+
cacheDir: 'C:\\Users\\Administrator\\.npminstall_tarball',
|
8
|
+
env: {
|
9
|
+
npm_config_registry: 'https://registry.npmmirror.com',
|
10
|
+
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\Administrator\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\Administrator\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"]}',
|
11
|
+
npm_config_user_agent: 'npminstall/7.12.0 npm/? node/v16.16.0 win32 x64',
|
12
|
+
npm_config_cache: 'C:\\Users\\Administrator\\.npminstall_tarball',
|
13
|
+
NODE: 'C:\\Program Files\\nodejs\\node.exe',
|
14
|
+
npm_node_execpath: 'C:\\Program Files\\nodejs\\node.exe',
|
15
|
+
npm_execpath: 'C:\\nvm\\v16.16.0\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
|
16
|
+
npm_config_userconfig: 'C:\\Users\\Administrator\\.cnpmrc',
|
17
|
+
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
|
18
|
+
npm_config_r: 'https://registry.npmmirror.com',
|
19
|
+
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
20
|
+
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
21
|
+
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
22
|
+
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
23
|
+
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
24
|
+
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
25
|
+
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
26
|
+
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
27
|
+
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
28
|
+
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
29
|
+
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
30
|
+
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
31
|
+
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
32
|
+
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
33
|
+
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
34
|
+
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
35
|
+
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
36
|
+
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
37
|
+
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
38
|
+
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
39
|
+
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
40
|
+
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
41
|
+
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
42
|
+
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
43
|
+
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
|
44
|
+
npm_rootpath: 'C:\\Users\\Administrator\\Desktop\\app\\npmdemo',
|
45
|
+
INIT_CWD: 'C:\\Users\\Administrator\\Desktop\\app\\npmdemo'
|
46
|
+
},
|
47
|
+
binaryMirrors: {
|
48
|
+
ENVS: {
|
49
|
+
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
|
50
|
+
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
51
|
+
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
52
|
+
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
53
|
+
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
54
|
+
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
55
|
+
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
56
|
+
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
57
|
+
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
58
|
+
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
59
|
+
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
60
|
+
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
61
|
+
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
62
|
+
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
|
63
|
+
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
64
|
+
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
65
|
+
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
66
|
+
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
67
|
+
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
68
|
+
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
|
69
|
+
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
70
|
+
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
71
|
+
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
72
|
+
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
73
|
+
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
|
74
|
+
},
|
75
|
+
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
|
76
|
+
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
|
77
|
+
'@tensorflow/tfjs-node': {
|
78
|
+
replaceHostFiles: [Array],
|
79
|
+
replaceHostRegExpMap: [Object],
|
80
|
+
replaceHostMap: [Object]
|
81
|
+
},
|
82
|
+
cypress: {
|
83
|
+
host: 'https://cdn.npmmirror.com/binaries/cypress',
|
84
|
+
newPlatforms: [Object]
|
85
|
+
},
|
86
|
+
'utf-8-validate': {
|
87
|
+
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
|
88
|
+
},
|
89
|
+
xprofiler: {
|
90
|
+
remote_path: './xprofiler/v{version}/',
|
91
|
+
host: 'https://cdn.npmmirror.com/binaries'
|
92
|
+
},
|
93
|
+
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
|
94
|
+
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
|
95
|
+
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
|
96
|
+
sqlite3: {
|
97
|
+
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
|
98
|
+
remote_path: 'v{version}'
|
99
|
+
},
|
100
|
+
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
|
101
|
+
grpc: {
|
102
|
+
host: 'https://cdn.npmmirror.com/binaries',
|
103
|
+
remote_path: '{name}/v{version}'
|
104
|
+
},
|
105
|
+
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
|
106
|
+
wrtc: {
|
107
|
+
host: 'https://cdn.npmmirror.com/binaries',
|
108
|
+
remote_path: '{name}/v{version}'
|
109
|
+
},
|
110
|
+
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
|
111
|
+
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
|
112
|
+
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
|
113
|
+
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
|
114
|
+
'flow-bin': {
|
115
|
+
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
|
116
|
+
host: 'https://cdn.npmmirror.com/binaries/flow/v'
|
117
|
+
},
|
118
|
+
'jpegtran-bin': {
|
119
|
+
replaceHost: [Array],
|
120
|
+
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
|
121
|
+
},
|
122
|
+
'cwebp-bin': {
|
123
|
+
replaceHost: [Array],
|
124
|
+
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
|
125
|
+
},
|
126
|
+
'zopflipng-bin': {
|
127
|
+
replaceHost: [Array],
|
128
|
+
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
|
129
|
+
},
|
130
|
+
'optipng-bin': {
|
131
|
+
replaceHost: [Array],
|
132
|
+
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
|
133
|
+
},
|
134
|
+
mozjpeg: {
|
135
|
+
replaceHost: [Array],
|
136
|
+
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
|
137
|
+
},
|
138
|
+
gifsicle: {
|
139
|
+
replaceHost: [Array],
|
140
|
+
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
|
141
|
+
},
|
142
|
+
'pngquant-bin': {
|
143
|
+
replaceHost: [Array],
|
144
|
+
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
|
145
|
+
replaceHostMap: [Object]
|
146
|
+
},
|
147
|
+
'pngcrush-bin': {
|
148
|
+
replaceHost: [Array],
|
149
|
+
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
|
150
|
+
},
|
151
|
+
'jpeg-recompress-bin': {
|
152
|
+
replaceHost: [Array],
|
153
|
+
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
|
154
|
+
},
|
155
|
+
'advpng-bin': {
|
156
|
+
replaceHost: [Array],
|
157
|
+
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
|
158
|
+
},
|
159
|
+
'pngout-bin': {
|
160
|
+
replaceHost: [Array],
|
161
|
+
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
|
162
|
+
},
|
163
|
+
'jpegoptim-bin': {
|
164
|
+
replaceHost: [Array],
|
165
|
+
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
|
166
|
+
},
|
167
|
+
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
|
168
|
+
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
|
169
|
+
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
|
170
|
+
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' },
|
171
|
+
'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' }
|
172
|
+
},
|
173
|
+
forbiddenLicenses: null,
|
174
|
+
flatten: false,
|
175
|
+
proxy: undefined,
|
176
|
+
prune: false,
|
177
|
+
disableFallbackStore: false,
|
178
|
+
workspacesMap: Map(0) {},
|
179
|
+
enableWorkspace: false,
|
180
|
+
workspaceRoot: 'C:\\Users\\Administrator\\Desktop\\app\\npmdemo',
|
181
|
+
isWorkspaceRoot: true,
|
182
|
+
isWorkspacePackage: false,
|
183
|
+
offline: false,
|
184
|
+
strictSSL: true,
|
185
|
+
ignoreScripts: false,
|
186
|
+
foregroundScripts: false,
|
187
|
+
ignoreOptionalDependencies: false,
|
188
|
+
detail: false,
|
189
|
+
forceLinkLatest: false,
|
190
|
+
trace: false,
|
191
|
+
engineStrict: false,
|
192
|
+
registryOnly: false,
|
193
|
+
client: false,
|
194
|
+
autoFixVersion: [Function: autoFixVersion]
|
195
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"name": "dlldemo",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"dependencies": {
|
7
|
+
"ffi-napi": "^4.0.3",
|
8
|
+
"path": "^0.12.7"
|
9
|
+
},
|
10
|
+
"devDependencies": {},
|
11
|
+
"scripts": {
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
13
|
+
},
|
14
|
+
"author": "",
|
15
|
+
"license": "ISC"
|
16
|
+
}
|