提交 cc2569e0 编写于 作者: K Knine

hmc-win32

上级 d5f1fa80
// https://github.com/wwog/easyWin
import ffi from 'ffi-napi'
// var libm = ffi.Library('libm', {
// 'ceil': [ 'double', [ 'double' ] ]
// });
// libm.ceil(1.5); // 2
import hmc from 'hmc-win32';
function 测试ffi_napi() {
// var libm = ffi.Library('libm', {
// 'ceil': [ 'double', [ 'double' ] ]
// });
// libm.ceil(1.5); // 2
// You can also access just functions in the current process by passing a null
// var current = ffi.Library(null, {
// 'atoi': [ 'int', [ 'string' ] ]
// });
// current.atoi('1234'); // 1234
// You can also access just functions in the current process by passing a null
// var current = ffi.Library(null, {
// 'atoi': [ 'int', [ 'string' ] ]
// });
// current.atoi('1234'); // 1234
var current = ffi.Library('user32.dll', {
var current = ffi.Library('user32.dll', {
'MessageBoxA': [ 'int', [ 'int', 'int' , 'int' , 'int' ] ]
});
current.MessageBoxA(0,0,0,0); // 1234
});
current.MessageBoxA(0,0,0,0); // 1234
// NTSTATUS NTAPI NtSuspendProcess(HANDLE ProcessHandle)
var ntdll = ffi.Library('ntdll.dll', {
// NTSTATUS NTAPI NtSuspendProcess(HANDLE ProcessHandle)
var ntdll = ffi.Library('ntdll.dll', {
'NtSuspendProcess': [ 'int', [ 'int' ] ]
});
ntdll.NtSuspendProcess(-1);
});
ntdll.NtSuspendProcess(-1);
}
function 测试hmc() {
// console.log(hmc)
let procList = hmc.Process.getDetailsList()
console.log(procList)
}
测试hmc()
\ No newline at end of file
......@@ -10,6 +10,7 @@
"license": "ISC",
"dependencies": {
"ffi-napi": "^4.0.3",
"hmc-win32": "^1.3.9",
"win32-api": "^20.4.1"
}
},
......@@ -70,6 +71,14 @@
"get-symbol-from-current-process-h": "^1.0.1"
}
},
"node_modules/hmc-win32": {
"version": "1.3.9",
"resolved": "https://registry.npmmirror.com/hmc-win32/-/hmc-win32-1.3.9.tgz",
"integrity": "sha512-FyhWEQRhO0ruUNSoZAQob3BTxdw/7ALjrA3mAt0SmjjXYIedbftUTX7qGCqHspFsthYjA1YM171KX9lDIWbyPA==",
"engines": {
"node": ">= 6.14.2"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
......@@ -227,6 +236,11 @@
"get-symbol-from-current-process-h": "^1.0.1"
}
},
"hmc-win32": {
"version": "1.3.9",
"resolved": "https://registry.npmmirror.com/hmc-win32/-/hmc-win32-1.3.9.tgz",
"integrity": "sha512-FyhWEQRhO0ruUNSoZAQob3BTxdw/7ALjrA3mAt0SmjjXYIedbftUTX7qGCqHspFsthYjA1YM171KX9lDIWbyPA=="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
......
......@@ -19,6 +19,7 @@
"license": "ISC",
"dependencies": {
"ffi-napi": "^4.0.3",
"hmc-win32": "^1.3.9",
"win32-api": "^20.4.1"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册