隐藏模块 - HideModule
函数简介
隐藏当前进程中指定的模块,并返回隐藏上下文句柄。
接口名称
HideModule
DLL调用
long HideModule(long instance, string moduleName);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug实例指针,由 CreateCOLAPlugInterFace 接口生成。 |
| moduleName | 字符串 | 模块名称,例如 XXX.dll,仅支持当前进程中已加载的模块。 |
示例
long instance = CreateCOLAPlugInterFace();
long ctx = HideModule(instance, "MyModule.dll");
if (ctx != 0) {
printf("隐藏成功, ctx=%ld\n", ctx);
// 使用完成后恢复模块
UnhideModule(instance, ctx);
}
DestroyCOLAPlugInterFace(instance);
返回值
- 成功:返回隐藏上下文句柄(长整数),用于后续调用
UnhideModule恢复模块。 - 失败:返回
0。
注意事项
- 隐藏模块可能会导致未知的问题,请谨慎使用。
- 隐藏上下文需在完成后使用 UnhideModule 释放。
