﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <description><![CDATA[Comments for Understanding Directory Monitoring]]></description>
    <title><![CDATA[Comments for Understanding Directory Monitoring]]></title>
    <link>http://edn.embarcadero.com/article/21743</link>
    <!-- source: http://edn.embarcadero.com/article/21743/feed-->
    <dc:date>2013-05-21T19:16:49-07:00</dc:date>
    <item>
      <description><![CDATA[Thanks for the excellent article.  The source won't compile "as is" in BCB 6. I'm not sure if its a version break or a typo but the call to synchronize doesn't work.//in article &lt;-------doesn't workSynchronize(Update());  //update list box//to fix replace withSynchronize(Update);  //update list boxThanks again.]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Gord Cross)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=37723</guid>
      <dc:date>2004-10-22T11:36:56-07:00</dc:date>
      <pubDate>2004-10-22T11:36:56-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <item>
      <description><![CDATA[Works execellent for windoze , however novell server does not want to play along , complains about -- not getting a handle -- .Pleasse Help.]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Craven Weasel)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=35082</guid>
      <dc:date>2003-08-07T10:24:58-07:00</dc:date>
      <pubDate>2003-08-07T10:24:58-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <item>
      <description><![CDATA[I have tried your component. It has been installed successfully.However I have question. 1. Why the property MonitorPath and the event OnDirectoryChangeis not visible while they are declared in the header file as __published.2. Can you advise me an example where the instruction RegisterEditor is used.Best regards,Vasyl Hiruk,Ukraine]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Vasyl Hiruk)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=34325</guid>
      <dc:date>2003-03-24T03:01:34-07:00</dc:date>
      <pubDate>2003-03-24T03:01:34-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <item>
      <description><![CDATA[HiI am trying to set up multiple directory monitoring..I am using FindFirstChangeNotification(directory,                             true,                            FILE_NOTIFY_CHANGE_LAST_WRITE); to get handles for directories and then using WaitForMultipleObjects(sizeof(watchDirectoryHandles)/sizeof HANDLE),                     watchDirectoryHandles, FALSE, INFINITE);To wait for nofifications.I am storing the hanles return from FindFirstChangeNotification ina a pointer list and then creating a dynamic array of handles to wait on..based on the number of entries in the list.This doesn't seem to be working.. I am not getting the notififcations.that the file times have changed?do I need to do anything special to the handles after I have received them from FindFirstChangeNotification or do I need to do anything special with WaitForMulitpleObjects..any help would be gratefully received..and by the way your article is far better than the microsoft documentation on Directory monitoring!.Yours Adrian Roney]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Adrian Roney)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=32414</guid>
      <dc:date>2002-05-29T05:20:06-07:00</dc:date>
      <pubDate>2002-05-29T05:20:06-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <item>
      <description><![CDATA[Trying to download the "Project Source and Test App"gives you the following page:Internal Application ErrorI/O error for file "d:\ibdata\CODECENTRAL.GDB" Error while trying to open file The system cannot find the file specified. url&lt;http://ww6.borland.com/codecentral/ccweb.exe/download?id=14666&gt;Broken/unmaintained link or temporary problem?JL]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Jyri Leino)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=31877</guid>
      <dc:date>2002-03-22T07:37:04-07:00</dc:date>
      <pubDate>2002-03-22T07:37:04-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <item>
      <description><![CDATA[Yes, I've wanted to know how to do this.  Looks good, just the posibility of an infinite loop in your thread, unless I've misread something.Does WaitForSingleObject(hNotify,2000); on return set hNotify to INVALID_HANDLE_VALUE?  Otherwise if 'to' gets set to false, you have an infinite loop.  Then some comments on the C++ coding of the Execute() method in the thread.Setting 'to' to true inside the nested while() does nothing, as to get inside the nested while() 'to' is already true.The break's after the setting of 'to' to false, do nothing, as the if() has nothing following.  Unless the desired behavior was to exit the thread.Can somone explain what is the intended behavoir, as it is a bit hard to understand putting the thread into an infinite loop.This following is the Execute() method of the thread as coded on the article.void __fastcall TDirectoryThread::Execute(){  if (path.IsEmpty() || (hNotify == INVALID_HANDLE_VALUE))  {    control-&gt;Restart();    throw Exception("couldn't start");  }  bool to=true;  //time-out check  //while we're still going...  while (!Terminated &amp;&amp; (hNotify != INVALID_HANDLE_VALUE))  {    //while we're still timed out...    while (to &amp;&amp; !Suspended &amp;&amp; !Terminated)    {      unsigned long stat = WaitForSingleObject(hNotify,2000);      //our call to WaitForSingleObject has a 2 second timeout to avoid thread-lock      if (stat == WAIT_OBJECT_0) //if it got signalled      {        to=true;        Synchronize(Update());  //update list box        //use Synchronize to keep it thread-safe        if (!FindNextChangeNotification(hNotify)) //renew the handle        {          to=false;          break;        }      }      else if (stat == WAIT_TIMEOUT)      //just keep going        to=true;      else {        to=false;        break;      }    }  }}Chuck]]></description>
      <title><![CDATA[Understanding Directory Monitoring]]></title>
      <managingEditor>
	 (Chuck Savage)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=28818</guid>
      <dc:date>2001-05-04T09:39:50-07:00</dc:date>
      <pubDate>2001-05-04T09:39:50-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/21743/feed">Comments for Understanding Directory Monitoring</source>
    </item>
    <generator>Atom 1.0 XSLT Transform v1 (http://atom.geekhood.net)</generator>
  </channel>
</rss>