FileSystemWatcher

  • Thread starter Thread starter Marc Ambrosius
  • Start date Start date
M

Marc Ambrosius

Is there a possibility to be informed about new files in a specified
directory? The Full Framework has the FileSystemWatcher class. I tried
Opennetcf's class with the same name but get a native exception every time I
set EnableRaisingEvents = true; (without that it doesn't make big sense...).

Are there other ways to do the same thing? Has any one been able to use the
Opennetcf class from Windows CE 4.2?

Thanks in advance

Marc
 
Looks like a possible bug in the code, what folder are you monitoring on the
device? what specific type of device is it? Can you tell from the debugger
if the error occurs when setting EnableRaisingEvents or immediately after if
an event occurs...

Peter
 
Peter Foot said:
Looks like a possible bug in the code, what folder are you monitoring on
the device? what specific type of device is it? Can you tell from the
debugger if the error occurs when setting EnableRaisingEvents or
immediately after if an event occurs...
It's a skeye.pad (www.skeye.com) running WCE 4.2 (not Pocket PC/Windows
Mobile). I am monitoring an existing folder "\input", but the exception
occurs with any folder and is independent from the argument's format
("\\input" or @"\input" etc.). Using the debugger the exception occurs
immediately when setting EnableRaisingEvents (setting it to false doesn't
result in an exception). Inside the property there is a call to AddDir()
which includes a native call to SHChangeNotifyRegister(windowSink.Hwnd, ref
notEntry);

Marc
 
SHChangeNotifyRegister API and such are a part of PPC shell. So they might be
missing on a non PPC devices.
 
Back
Top