You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Announcement
Collapse
No announcement yet.
monitoring a file for changes (createchangenotify?)
monitoring a file for changes (createchangenotify?)
Does anybody have any examples of monitoring a single file for changes? From memory theres an API call called SomethingChangeNotify or thereabouts, Im sure somebody here has done it before but I couldnt find any links?
The APIs you are after are
FindFirstChangeNotification and FindNextChangeNotification.
Also, if you need a responsive GUI you will need
MsgWaitForMultipleObjects.
There is a nice example of this in Advanced Windows by Jeffrey Richter
in the chapter on file systems(FILECHNG.EXE).
The new version of his book has a new name. I don't remember what it
is at the moment.
Also, in the source code forum I posted an 'Internet Cookie Monitor" program which uses the File Notify stuff. It includes the code you need to figure out which file in a folder has changed.
This was 4-6 weeks ago if you use the search. (Just search on "cookie" it should turn up).
geez, i answered my own question in november 2000 but had completely forgotten about it, http://www.powerbasic.com/support/pb...ad.php?t=22834 - "monitor a directory to detect filesize change"
dave, i think i need to join you on that vacation ...
thanks for pointing me to that cookie monitor though michael, very cute little utility
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment