FindFirstChangeNotification
-
Is there an equivalent function to FindFirstChangeNotification that works across a home network ? :confused:
Doug
-
Is there an equivalent function to FindFirstChangeNotification that works across a home network ? :confused:
Doug
hmmmm - how do you mean
DougButtimer wrote:
across a home network
In general, iirc, FindFirstChangeNotification can only be used on a local PC and cant even be used to watch net shares. Any time Ive needed to 'achieve similar' across a network Ive used ftp to list a directory at time-0 'initial snapshiot', then compared that to ftp lists at time+n where n is 'polled'/refreshed at desired intervals - eg 5 or 15 minutes sorry, likely doesnt help much 'g'
-
hmmmm - how do you mean
DougButtimer wrote:
across a home network
In general, iirc, FindFirstChangeNotification can only be used on a local PC and cant even be used to watch net shares. Any time Ive needed to 'achieve similar' across a network Ive used ftp to list a directory at time-0 'initial snapshiot', then compared that to ftp lists at time+n where n is 'polled'/refreshed at desired intervals - eg 5 or 15 minutes sorry, likely doesnt help much 'g'
Hi Garth, Just after I had made this posting, I realised that I'd hit this problem once before and hadn't found a solution then either, so your reply wasn't unexpected ! Yes, I think that I'll have to resort to some solution along your lines ! Thanks, and a very happy Christmas to you !
Doug
-
Hi Garth, Just after I had made this posting, I realised that I'd hit this problem once before and hadn't found a solution then either, so your reply wasn't unexpected ! Yes, I think that I'll have to resort to some solution along your lines ! Thanks, and a very happy Christmas to you !
Doug
I thought of 2 possibilities 'a bit better' than comparing ftp listings Both really depend on how many files/events you are looking for - one might work for instance with creation of a particular file or a 'low volume' change system than the other - what about :- 1) use FindFirstChangeNotification on the machine you are watching, but add the [possibly filtered] events to a log file ... everytime you ftp from the 'monitoring machine', you grab the log file and erase it 2) use a tcp pub/sub system, the monitored machine publishes [again, possibly filtered] events from FindFirstChangeNotification to subscriber(s) - the monitor machine(s) 'subscribe' to particular events composing of {source machine name, add/change/delete, file(s)} for example - a lot more work, but extensible and applicable to multiple machines you might want to monitor from not much I know 'g'
-
Is there an equivalent function to FindFirstChangeNotification that works across a home network ? :confused:
Doug
Im going to undo everything I just said - I just did some more reading - if you follow http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(VS.80).aspx[^] it says you can monitor UNC paths !!! 'g'
-
Im going to undo everything I just said - I just did some more reading - if you follow http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(VS.80).aspx[^] it says you can monitor UNC paths !!! 'g'
Garth, Unfortunately, being a novice, I'm not "in to" Net Framework !! Thanks for your research, nevertheless
Doug
-
Garth, Unfortunately, being a novice, I'm not "in to" Net Framework !! Thanks for your research, nevertheless
Doug
yes, but .NET uses ReadDirectoryChangesW - which if you look at this :- CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up[^] shows how its possible to use it from c++ - and there are other examples 'out there' :-) 'g'
-
yes, but .NET uses ReadDirectoryChangesW - which if you look at this :- CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up[^] shows how its possible to use it from c++ - and there are other examples 'out there' :-) 'g'
Hi Garth, I think that the real problem is that the folder that I want to watch is on a NAS disk and so the "This code will only work on Windows NT, Windows 2000, or Windows XP, and the directory you wish to watch must also reside on a WindowsNT, Windows 2000, or Windows XP computer" is going to make it a non-starter. I've now implemented a polling _findfirst/_findnext strategy which, although a bit basic, works fine !! (Just hope that the NAS disk can stand the traffic !!) Many thanks for your determination to find me a solution !!! Cheers !
Doug