EldoS | Feel safer!

Software components for data protection, secure storage and transfer

NotifyDirectoryChange in v2.5

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#10178
Posted: 05/27/2009 08:14:58
by Bruce Storrie (Basic support level)
Joined: 05/27/2009
Posts: 2

Hi,

Has anyone experienced problems calling NotifyDirectoryChange using version 2.5 of CallbackFS, here's my scenario:

1. Create new virtual disk
2. Use Windows Explorer to copy files to the virtual disk
3. Have a separate thread add random files to the virtual disk storage system (in my case a database)
4. Call the NotifyDirectoryChange method

When this happens I think it's closing all the open files and performing the refresh, the problem is that windows then reports that the volume has somehow changed and throws an IO error dialog reporting this.

I've tried the same thing using version 2.1.44 and everything seems to work (although I need to do more testing).

I'm using version 2.5.51 under Vista Home Premium (32-bit).

Cheers
Bruce
#10180
Posted: 05/27/2009 08:30:11
by Volodymyr Zinin (EldoS Corp.)

Hi,

Could you specify the parameters of the NotifyDirectoryChange calls?

Quote
Bruce Storrie wrote:
the problem is that windows then reports that the volume has somehow changed and throws an IO error dialog reporting this.

Please give me a screenshot for this dialog.

Thanks.
#10192
Posted: 05/27/2009 13:59:50
by Bruce Storrie (Basic support level)
Joined: 05/27/2009
Posts: 2

Hi,

The parameters are as follows:

NotifyDirectoryChange("\\", CallbackFS.CbFsNotifyFileAction.fanModified);

Or

NotifyDirectoryChange("\\Music", CallbackFS.CbFsNotifyFileAction.fanModified);

I will send a screenshot shortly, but have just got everything working so need to finish some testing before upgrading the component again.

Thanks
#10200
Posted: 05/28/2009 03:30:50
by Volodymyr Zinin (EldoS Corp.)

It's necessary to call NotifyDirectoryChange for all files added not through the CallbackFS interface (i.e. not by means of I/O operations on a CallbackFS virtual disk). For example:
If a folder with the name "Music" was added (it doesn't matter whether it contains files or subfolders), then just call
NotifyDirectoryChange("\\Music", CallbackFS.CbFsNotifyFileAction.fanAdded);
But if in some already existing folder some files were added/removed/modified (not through the CallbackFS interface) then it's necessary to call NotifyDirectoryChange for all of them. I.e.:
NotifyDirectoryChange("\\Folder1\\file1", CallbackFS.CbFsNotifyFileAction.fanAdded);
NotifyDirectoryChange("\\Folder2\\Folder3\\file2", CallbackFS.CbFsNotifyFileAction.fanRemoved);
NotifyDirectoryChange("\\file3", CallbackFS.CbFsNotifyFileAction.fanModified);

BTW: There were several discussions in this forum about this function. So you can find some useful information there. For example here: http://www.eldos.com/forum/read.php?FID=13&TID=1634.

Reply

Statistics

Topic viewed 3358 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!