Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
夜猫逐梦
MyOpen
提交
cc2569e0
M
MyOpen
项目概览
夜猫逐梦
/
MyOpen
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
MyOpen
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cc2569e0
编写于
12月 01, 2023
作者:
K
Knine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hmc-win32
上级
d5f1fa80
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
47 addition
and
18 deletion
+47
-18
electron/index.js
electron/index.js
+32
-18
electron/package-lock.json
electron/package-lock.json
+14
-0
electron/package.json
electron/package.json
+1
-0
未找到文件。
electron/index.js
浏览文件 @
cc2569e0
// 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
electron/package-lock.json
浏览文件 @
cc2569e0
...
...
@@ -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"
,
...
...
electron/package.json
浏览文件 @
cc2569e0
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录