我一直在寻找能够为VS2017的C ++应用程序生成清单文件的方法。我见过VS2010的一些东西,而我在VS2017上看到的唯一东西是MS网站上的this page。但是,尚不清楚实际生成文件。所以我所做的是:
Configuration Properties > Manifest Tool > Embed Manifest
并
将其设置为No
。我现在在filename.exe.manifest
旁边有一个名为filename.exe
的外部文件。然后,我在MS网站上从disableWindowFiltering获得的清单中添加了以下粗体和斜体信息(不幸的是,由于页面上没有锚点,因此不是直接链接):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings"> <disableWindowFiltering>true</disableWindowFiltering> </asmv3:windowsSettings> </asmv3:application> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo> </assembly>
完成后,我执行了该应用程序。它似乎并没有改变结果。我仍然无法使用EnumWindows()
和EnumChildWindows()
枚举所有窗口。该过程也在管理员权限下运行。
我做错了吗?