Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
hi,
 
msdn suggest that Change Journals to use instead of ReadDirectoryW..
How to use this to monitor the directory..
Posted 23-Jan-13 18:18pm
Comments
Sergey Alexandrovich Kryukov at 24-Jan-13 0:44am
   
Do you mean "how to use C"..?
—SA
aimdharma at 24-Jan-13 0:49am
   
yes
Sergey Alexandrovich Kryukov at 24-Jan-13 0:59am
   
Then do yourself a favor, fix the title of the question... Can you see "Improve question"?
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 517
1 CPallini 460
2 Sergey Alexandrovich Kryukov 358
3 George Jonsson 251
4 BillWoodruff 224
0 OriginalGriff 5,370
1 CPallini 4,360
2 Sergey Alexandrovich Kryukov 3,822
3 George Jonsson 3,037
4 Gihan Liyanage 2,435


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100