恢复模块 - UnhideModule
函数简介
恢复通过 HideModule 接口隐藏的模块,并释放对应的隐藏上下文。
接口名称
UnhideModule
DLL调用
int UnhideModule(long instance, long ctx);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug实例指针,由 CreateCOLAPlugInterFace 接口生成。 |
| ctx | 长整数型 | 隐藏上下文句柄,由 HideModule 接口返回,只能使用一次,不可重复释放。 |
示例
long instance = CreateCOLAPlugInterFace();
long ctx = HideModule(instance, "MyModule.dll");
if (ctx != 0) {
printf("隐藏成功\n");
// 恢复模块
int ok = UnhideModule(instance, ctx);
printf("UnhideModule ok=%d\n", ok);
}
DestroyCOLAPlugInterFace(instance);
返回值
1 成功,0 失败。
注意事项
- 隐藏上下文需要通过
HideModule接口生成,并且不能重复释放。 - 释放隐藏上下文后,对应模块将恢复显示。
