You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code in the Release repo has been updated, but a new version is not made. Please download the source code from the Release repo directly, instead of downloading the latest release.
The text was updated successfully, but these errors were encountered:
vczh
added
the
Fixed
The issue has been fixed, but you need temporary manual steps to apply.
label
Mar 28, 2019
从 MSDN 文档上,我们可以得知 GetModuleHandle API 的描述是 "Retrieves a module handle for the specified module. The module must have been loaded by the calling process." 。
在你的实现中,你使用这个 API 来获取 user32.dll 和 shcore.dll 的模块句柄。咱们都知道,user32.dll 每个 现代的能运行图形应用的 Windows 的映像实例都是存在的且只要是图形应用这个动态链接库就已经被进程加载。
但是 shcore.dll 的话,你是否存在可靠的证据来确定只要有这个动态链接库的 Windows 映像实例的进程只要是图形应用时就一定会把 shcore.dll 加载进进程呢。如果你没有可靠的证据保证的话,感觉使用 LoadLibrary API 是明智的选择。当然确定这点的时候一定是要那没有打任何补丁的 Windows 映像实例来验证的,原因我感觉你能理解的。
当然,如果你要确定使用 LoadLibrary API 的时候,我希望您能把动态链接库劫持缓解机制也考虑进去。这方面的话,直接解释做法,还不如给你看我写的代码更加清楚。
I fixed the issue by skipping APIs in non-supported OS: WinNativeDpiAwareness.cpp.
Code in the Release repo has been updated, but a new version is not made. Please download the source code from the Release repo directly, instead of downloading the latest release.
The text was updated successfully, but these errors were encountered: