如何在Windows中使用Change Journals来使用c [英] How to user c with Change Journals in windows

查看:83
本文介绍了如何在Windows中使用Change Journals来使用c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





msdn建议使用Change Journals来代替ReadDirectoryW ..

如何使用它来监控目录。 。



msdn suggest that Change Journals to use instead of ReadDirectoryW..
How to use this to monitor the directory..

推荐答案

这里有完整的描述: http://msdn.microsoft.com/en-us/library/aa363798%28v=vs.85%29.aspx [ ^ ]。



所有操作均使用卷管理执行: http://msdn.microsoft.com/en-us/library/aa365731%28v=vs.85%29.aspx [ ^ ]。



当你提到而不是......时,你可能意味着微软建议 FindFirstChangeNotification ReadDirectoryChangesW ,它需要应用程序一直执行并始终使用系统资源。但是,有时这正是需要的,因为资源以最佳方式使用,因为使用了推送技术。有关优点的理解和讨论,请参阅:

http://en.wikipedia.org/wiki / Push_technology [ ^ ],

http://en.wikipedia.org/wiki/Pull_technology [ ^ ]。



相比之下,期刊方法提供了一个非常不同的向我展示差异的方法,比较前后。同样,它有一些不同的用途。



因此,结论是:它实际上取决于你的最终目标。如果您需要有关做出选择的建议,您需要解释最终目的,从您理解或关注与工具需求相关的任何想法中明确表达。实际上,我建议你提出这样的解释。



-SA
It is fully described here: http://msdn.microsoft.com/en-us/library/aa363798%28v=vs.85%29.aspx[^].

All the operations are performed with Volume Management: http://msdn.microsoft.com/en-us/library/aa365731%28v=vs.85%29.aspx[^].

When you mentioned "instead of...", you probably mean Microsoft advice about FindFirstChangeNotification or ReadDirectoryChangesW, which need the application to execute all the time and use system resource all the time. However, sometimes this is exactly what''s needed, because the resource are used in an optimal way, due to the use of push technology. For understanding and discussion of the benefits, please see:
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

In contrast, Journal approach provides a very different, "show me the difference" approach, "compare before and after". Again, it has its benefit for some different purpose.

So, the conclusion is: it really depends on your ultimate goal. If you want an advice on making a choice, you would need to explain the ultimate purpose, in terms clear from your understanding or preoccupation with any ideas related to instrumental needs. Actually, I would advise to start any your questions with such explanation.

—SA


这篇关于如何在Windows中使用Change Journals来使用c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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