添加白名单 - VipProtectAddWhitelist
函数简介
添加白名单。(高级版功能,普通版无法使用)
接口名称
VipProtectAddWhitelist
DLL调用
int32_t VipProtectAddWhitelist(int64_t instance, int64_t pid, string path);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| pid | 长整数型 | 需要添加白名单的进程ID。 |
| path | 字符串 | 需要添加白名单的文件或文件夹路径。 |
示例
int64_t instance = CreateCOLAPlugInterFace();
int32_t ok = VipProtectAddWhitelist(instance, 3456, "C:\\Important\\file.txt");
printf("VipProtectAddWhitelist: %d\n", ok);
DestroyCOLAPlugInterFace(instance);
返回值
1 成功,其他失败。
注意事项
- 需要驱动支持与管理员权限。
- 需要先调用 VipProtectEnableDriver 开启高级保护。
- 白名单中的进程或路径可以访问受保护资源(当保护模式为允许白名单时)。
