AppCertDLL 在 GUI 应用程序中不起作用,为什么?

AppCertDLLs do not work in GUI apps, why?

我试图在每个进程(包括 GUI)被用户启动时自动注入一个 dll。我的 DLL 挂钩 winapi 的 DoDragDrop 方法并与服务器通信以决定允许或禁止拖放过程。我使用 easyhook(特别是 this tutorial) for hooking part. I created a gist for my code : Gist

this url 中它说:不能可靠地针对 GUI 应用程序工作。坚持使用控制台应用程序。难怪它在 Microsoft Edge 中不起作用,并且 chrome。 我还尝试了这些 url 中的代码部分: first second 最后,我已经 certificated 我的 dll。

除了appcertdlls还有其他方法吗?提前谢谢你。

编辑:我不能使用 appinitdlls,有些用户可能启用了安全启动。

Edit2: 好像某些教程中的 dll 在 system32 下(this, and this) , and I moved mine 也在 system32 下,但它没有 工作。

可以使用PsSetLoadImageNotifyRoutine,虽然是内核模式下的解决方案。