Windows BlockInput功能不工作
Windows BlockInput function is not working
为什么BlockInput
不工作
#include <iostream>
#include <windows.h>
#include <winable.h>
int main() {
BlockInput(true);
Sleep(10000);
return 0;
}
而且它根本不会阻塞任何东西
我仍然可以做任何事情,就像我还没有做过一样
我还觉得奇怪的是MSDN说它应该在winuser.h
中声明,而它在Winable.h
+中。我以为winable.h
在windows.h
中,但事实并非如此,我不得不单独包含它>_>
如果它对我的IDE有帮助的话:
代码::块10.05 MinGW
编辑:实际上我做了GetLastError()
,它打印错误5 ERROR_ACCESS_DENIED
我如何获得访问权限?
以管理员身份运行代码。右键单击可执行文件,然后单击"以管理员身份运行"。
相关文章:
- OpenSSL 解密功能无法正常工作
- 链表中的显示功能无法正常工作
- 打印功能无法正常工作 - 链表
- 排序功能在C++中未按预期工作
- 如何组织 git 工作流以修复错误并同时引入新功能
- 为什么必须动态分配扩展数组才能使此功能正常工作C++
- Qt C++括号匹配和突出显示当前线路功能无法协同工作
- 下面的代码是如何工作的?它输出分解的数字并且功能齐全,我只是不明白它是如何做到的
- C 功能如何内部工作
- 大写功能无法正常工作
- 为什么这个base64解码/编码功能不能正常工作?
- 如何使功能"run"工作。程序在调用运行时退出
- C 11螺纹 - 非静态成员功能的使用无效 - 工作GCC 5.1.0损坏的GCC 7.3.1
- Lower_bound功能无法正常工作
- 仅一个功能的链接错误.在同一类和CPP文件中具有相似签名的其他函数工作正常
- 功能测试宏在 Visual C++ 中无法正常工作
- 将Linux打开,读,写,关闭功能以在Windows上工作
- 如何使用字符串更改此插入功能以在链接列表中工作
- 澄清功能如何工作并与类相关
- C //尝试重写一个工作代码以包括我的功能