日志关闭Windows中所有的Windows [英] Log all Windows that are Closed in Windows

查看:472
本文介绍了日志关闭Windows中所有的Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一个外壳扩展或应用程序在.NET中,记录已关闭所有窗口。日志中应包含创建一个窗口中的进程名。

I want to make a shell extension or app in .NET that logs all windows that are closed. The log should contain the process name that created a window.

我对如何做到这一点没有想法。任何指针?

I have no ideas on how to do this. Any pointers?

推荐答案

这需要一个钩子,通过调用SetWindowsHookEx,WH_SHELL钩子类型设置。此钩型需要可以注入一个过程中,如一个DLL不能用C#编写的DLL。 64位操作系统和UAC将创造大量的障碍,以及。 该项目可以提供帮助。

This requires a hook, set by SetWindowsHookEx, WH_SHELL hook type. This hook type requires a DLL that can be injected into a process, such a DLL can't be written in C#. A 64-bit operating system and UAC will create plenty of obstacles as well. This project can help.

这篇关于日志关闭Windows中所有的Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆