[英]Can windows eventtriggers be used for trivial events?
In an application I am making, I want to know when a user copies a file or clicks the start button. 在我正在制作的应用程序中,我想知道用户何时复制文件或单击“开始”按钮。 Those actions would be considered too trivial but they carry some importance in my application. 这些动作被认为是微不足道的,但是它们在我的应用程序中具有重要意义。
Yesterday, I received a comment Getting notified of any action taken by user on windows on a similar question so I am hesitating to switch the entire auditing infrastructure. 昨天,我收到一条评论,该通知将用户在Windows上针对类似问题采取的任何操作通知我,因此我犹豫要切换整个审核基础结构。
Going as per explanation of eventtriggers http://technet.microsoft.com/en-us/library/bb490901.aspx 按照事件触发的解释进行操作http://technet.microsoft.com/zh-cn/library/bb490901.aspx
Creates a new event trigger that monitors and acts upon the occurrence of log events of given criteria. 创建一个新的事件触发器,该触发器监视给定条件的日志事件的发生并采取措施。
I am not sure what the limits of eventtriggers and how it can help me achieve my goal without so much overhead. 我不确定事件触发的局限性是什么,以及它如何在没有太多开销的情况下帮助我实现目标。 Can eventtriggers help me set a trigger that notifies me when the start button is clicked?. 事件触发程序可以帮助我设置一个触发器,当单击“开始”按钮时通知我吗?
Not possible, to my knowledge, unless you poll to find out the status. 据我所知,除非您进行投票以找出状态,否则这是不可能的。 This example was already brought up in a previous question on SO: How can I detect when the Windows 7 start menu opens 该示例已在先前关于SO的问题中提出: 如何检测Windows 7开始菜单何时打开
Theoretically you could write something that lives on a different thread that queries the start menu at given intervals. 从理论上讲,您可以编写驻留在不同线程上的东西,这些线程以给定的时间间隔查询开始菜单。 Then, if the start menu was detected as open you could trigger the code you want done. 然后,如果开始菜单被检测为打开,则可以触发您想要完成的代码。 Just a thought... 只是一个想法...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.