tags:

views:

234

answers:

2

Does it run in a loop polling the contents? (Highly unlikely and inefficient.)

Or is it done with some event trigger?

In fact, what I am really wondering is how does Windows Explorer refresh itself when it shows the contents of another computer over a network?

How does the computer (or the OS) with the content notify the computer with the Explorer that its content has changed? If there is a mechanism to notify, what is the protocol? RPC?

Thanks

Thushan

+3  A: 

See this previous question:

http://stackoverflow.com/questions/627068/how-does-filesystemwatcher-work-on-another-computers-directory

It appears to be based on the ReadDirectoryChangesW API function.

Edit: There is a Microsoft article detailing another way to do it, but the documentation for the specific functions imply that it might not work on a remote computer.

Mark Ransom
A: 

is this just out of curiosity or are you looking to do the same type of thing for your application?

if you just need to be notified of changes to folders in normal user scenarios consider SHChangeNotifyRegister. if you're just curious or need a lower level hook, nevermind. :)

~jewels

Jewel S
Just out of curiosity. :)
Thushan