vb.netfilesystemwatcherwmdc

Portable Device filesystem as VB .NET FileSystemWatcher Class Path property


I would like to use the .NET FileSystemWatcher class to monitor a folder path which is located on a device currently connected to the host computer and is being managed by Windows Mobile Device Center. The environment is Windows 7 Pro, x64.

When connected to the PC, the device is listed under "Computer" -> "Portable Devices", and I can navigate to its filesystem from there. When setting the "Path" property of my VB .NET app's FileSystemWatcher class object instance, however, it only accepts a valid string-representation of a standard filesystem path (eg. c:\somedir\thisdir), whereas the address bar of a navigable portable device reads "Computer\Pocket_PC\";a value which throws an exception at runtime.

Am I able to use the FileSystemWatcher class in this context? How else could I get a PC app to monitor file activity on a handheld device while it is attached?

Many thanks!

Joe


Solution

  • What you see is not a real filesystem and so FileSystemWatcher can't monitor it. I think that maybe you can make some use of ICopyHook though.