EldoS | Feel safer!

Software components for data protection, secure storage and transfer

NotifyDirectoryChange - problem, allways false

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 01/29/2008 05:11:01
by Marcin Zreda (Basic support level)
Joined: 06/01/2007
Posts: 9

New functionality NotifyDirectoryChange on CallBack FileSystem supposed to not working, it allways return false. On "C:\" too :)

Posted: 01/29/2008 05:42:15
by Eugene Mayevski (EldoS Corp.)

1) What API are you using?
2) Does the method perform it's function?
3) What error code is returned by GetLastError WinAPI function?

Sincerely yours
Eugene Mayevski
Posted: 01/29/2008 05:53:03
by Marcin Zreda (Basic support level)
Joined: 06/01/2007
Posts: 9

1) .net 2.0
2) No, no refresh in explorer
3) 183 - ERROR_ALREADY_EXISTS - Cannot create a file when that file already exists
Posted: 01/29/2008 08:18:12
by Eugene Mayevski (EldoS Corp.)

Thank you, the developers are investigating the possible problem. It would be great if you also specified the OS you are doing the test on.

Sincerely yours
Eugene Mayevski
Posted: 01/29/2008 13:23:04
by Volodymyr Zinin (EldoS Corp.)

This function cannot be called from the callback thread context. It's quite possible this is a reason of the problem.
Also could you please specify your code chunk where the function is called?
Posted: 01/30/2008 05:54:41
by Marcin Zreda (Basic support level)
Joined: 06/01/2007
Posts: 9


Thanks for replays.

I have .net API and there is a event DirChanged.
This API is used by 2 applications, One is desktop CRM, Second CallBackDriver windows service.

When I'm adding file in CRM App, the event is generated and in CallBackService some method is invoked, there I'm using Your Notify function.

ShellApi.shellService.OnChanged += new ShellService.RefreshEventDelegate(ShellServiceRefreshEvent);

private void ShellServiceRefreshEvent(string target)
if (!cbFS.NotifyDirectoryChange(target, CbFsNotifyFileAction.fanAdded))
logger.Info("FS Notify failed " + string.Concat(ShellManager.Instance.FILESYSTEM_LETTER, target));
Posted: 01/30/2008 09:27:42
by Volodymyr Zinin (EldoS Corp.)


Marcin Zreda wrote:
if (!cbFS.NotifyDirectoryCha­nge(target, CbFsNotifyFileAction.fanA­dded))

Please specify the "target" parameter content.
Posted: 01/30/2008 09:34:20
by Volodymyr Zinin (EldoS Corp.)

And what the OS version (including does it 32 or 64-bit) are you using?

Posted: 02/01/2008 05:25:05
by Marcin Zreda (Basic support level)
Joined: 06/01/2007
Posts: 9


System: Windows Xp Prof - with actual upgrades
PC: 32bit - PIV 1.8Mhz signle core

Target param
I've try "C:\Home", "C:\\Home", "C:\Home\"

Posted: 02/01/2008 06:05:54
by Volodymyr Zinin (EldoS Corp.)


You must specify a file or directory name that was added to its parent directory. And this name must be without drive letter. For example: "\Home\file.txt".
CallbackFS Help has a mistake in the CallbackFileSystem.NotifyDirectoryChange method description for its first parameter. We will fix it.
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.



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