EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Using NotifyDirectoryChange

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#7626
Posted: 09/16/2008 09:31:37
by Tim Hayes (Standard support level)
Joined: 06/06/2007
Posts: 36

Hi

I am on Win XP 2003 Home. My application with CBFS allows multiple files and/or folders to be added by a remote host. I need to notify Windows when this is done. Reading the current help:

a) Do I have to call CBFS.NotifyDirectoryChange(filename, fanAdded) for each new file or folder?
b) Do I have to call CBFS.NotifyDirectoryChange(filename, fanAdded) for each file or folder deleted? What about folder contents?
c) Do I have to call CBFS.NotifyDirectoryChange(filename, fanAdded) for each new file or folder changed? What about when something has been renamed?

Is NotifyDirectoryChange intended solely to notify applications using FindFirstChangeNotification? Does this include shell browsers when open at a specific folder??

Thanks in advance
Tim Hayes
#7627
Posted: 09/16/2008 09:32:46
by Tim Hayes (Standard support level)
Joined: 06/06/2007
Posts: 36

And my cut / paste as ever let me down. For points b) and c) I mean the parameters fanRemoved and fanModified.....

Tim Hayes
#7629
Posted: 09/16/2008 10:20:19
by Volodymyr Zinin (EldoS Corp.)

Hello,

NotifyDirectoryChange is needed only if some file or directory is added, deleted or renamed in a nonstandard way - i.e. not by creating or placing it in the CallbackFS virtual disk. For example if your application decided that some new file must appear in an already existing virtual disk (i.e. for example this file was not added by calling CreateFile("x:\file"), where "x:" is the virtual disk name), it should call NotifyDirectoryChange and all applications (usually file browsers) that wait for changing in the virtual disk directories will be notified that a new file has appeared and reread the directory where the file was placed. This will cause to call the OnEnumerateDirectory callback in which your application will be able to enumerate this new file.
In the other case (when a file or a directory is added, deleted or renamed via the virtual disk) CallbackFS does necessary notifications itself.

Reply

Statistics

Topic viewed 2554 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!