471,325 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Use of FileSystemWatcher ???

Dear all,

I have a Windows VB application which monitor a folder for new created XML
files.
This with the use of FileSystemWatcher components.
My application is just monito the Change event

The list of files that belongs to that folder are displayed in a treeView
control.
From that treeview control, when a node is selected, I am reading the file
content into a dataset bind to a datagrid.

It works perfectly well from the application side but as soon as I start to
cut and past file, manually by using WIndows explorer, it crash windows
explorer itself but my application is still running perfecly well.

How could this be happen, does SystemFileWatcher component does or lock
something on the monitor folder ? or does my reading XML file creates a lock
situatiion.

Does anyone could explain that situation ?

reagrds
serge
Jul 21 '05 #1
1 1800
Hi serge

It works perfectly well from the application side but as soon as I start to
cut and past file, manually by using WIndows explorer, it crash windows
explorer itself but my application is still running perfecly well.

I guess it could also be a violation of STA-threading rules in your application.
Read all about
FileSystemWatcher.SynchronizingObject
FileSystemWatcher uses the Win32: ReadDirectoryChangesW API internally,
I don't think this will crash the Explorer.

--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Josh Usovsky | last post: by
1 post views Thread by Troy Murphy | last post: by
7 posts views Thread by Allen Anderson | last post: by
3 posts views Thread by Stampede | last post: by
5 posts views Thread by Goran Djuranovic | last post: by
5 posts views Thread by =?Utf-8?B?Sm9obiBT?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.