保护窗口 - ProtectWindow
函数简介
设置指定窗口保护状态,防止被截图
接口名称
ProtectWindow
DLL调用
int32_t ProtectWindow(int64_t instance, int64_t hwnd, int32_t flag);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄 |
| flag | 整数型 | 是否保护(0:取消保护 1:截图黑屏 2:截图透明)。 |
示例
int64_t instance = CreateCOLAPlugInterFace();
int32_t ok = ProtectWindow(instance, 1234, 1);
printf("ProtectWindow: %d\n", ok);
DestroyCOLAPlugInterFace(instance);
返回值
1 成功,其他失败。
注意事项
- 需要驱动支持与管理员权限。
