<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[FindFirstChangeNotification Problem]]></title><description><![CDATA[<p>Habe folgenden Code:</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;
#include &lt;iostream&gt;

using namespace std;

int main(int argc, char* argv[])
{
	HANDLE dwChangeHandles[2];
	DWORD dwWaitStatus;

	//Ordner die überwacht werden sollen
	dwChangeHandles[0] = FindFirstChangeNotification(&quot;C:\\test&quot;, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);

	if (dwChangeHandles[0] == INVALID_HANDLE_VALUE)
		ExitProcess(GetLastError());

	while (TRUE)
	{
		dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles, FALSE, INFINITE);

		switch (dwWaitStatus)
		{
		case WAIT_OBJECT_0:

			if (FindNextChangeNotification(dwChangeHandles[0]) == FALSE)
			{
				ExitProcess(GetLastError());
			}
			break;
		}
	}
	return 0;
}
</code></pre>
<p>Wieso erkennt das Programm nicht, wenn ich in den Ordner eine Datei kopiere oder wenn ich die Datei ändere? Muss ich da noch irgenwas hinzufügen?</p>
<p>LG Andreas</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75804/findfirstchangenotification-problem</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 05:38:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75804.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Jun 2004 11:01:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FindFirstChangeNotification Problem on Fri, 04 Jun 2004 11:01:29 GMT]]></title><description><![CDATA[<p>Habe folgenden Code:</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;
#include &lt;iostream&gt;

using namespace std;

int main(int argc, char* argv[])
{
	HANDLE dwChangeHandles[2];
	DWORD dwWaitStatus;

	//Ordner die überwacht werden sollen
	dwChangeHandles[0] = FindFirstChangeNotification(&quot;C:\\test&quot;, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);

	if (dwChangeHandles[0] == INVALID_HANDLE_VALUE)
		ExitProcess(GetLastError());

	while (TRUE)
	{
		dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles, FALSE, INFINITE);

		switch (dwWaitStatus)
		{
		case WAIT_OBJECT_0:

			if (FindNextChangeNotification(dwChangeHandles[0]) == FALSE)
			{
				ExitProcess(GetLastError());
			}
			break;
		}
	}
	return 0;
}
</code></pre>
<p>Wieso erkennt das Programm nicht, wenn ich in den Ordner eine Datei kopiere oder wenn ich die Datei ändere? Muss ich da noch irgenwas hinzufügen?</p>
<p>LG Andreas</p>
]]></description><link>https://www.c-plusplus.net/forum/post/533067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/533067</guid><dc:creator><![CDATA[housefreak]]></dc:creator><pubDate>Fri, 04 Jun 2004 11:01:29 GMT</pubDate></item><item><title><![CDATA[Reply to FindFirstChangeNotification Problem on Fri, 04 Jun 2004 11:24:43 GMT]]></title><description><![CDATA[<p>siehe<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/obtaining_directory_change_notifications.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/obtaining_directory_change_notifications.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/533091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/533091</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Jun 2004 11:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to FindFirstChangeNotification Problem on Fri, 04 Jun 2004 11:32:42 GMT]]></title><description><![CDATA[<p>Hab den Code von dort, der funktioniert aber nicht so richtig wie er soll, weis auch nicht wie die funktionen wie z.b RefreshDirectory() machen, kann mir da jemand vielleicht helfen?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/533101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/533101</guid><dc:creator><![CDATA[housefreak]]></dc:creator><pubDate>Fri, 04 Jun 2004 11:32:42 GMT</pubDate></item><item><title><![CDATA[Reply to FindFirstChangeNotification Problem on Fri, 04 Jun 2004 21:01:13 GMT]]></title><description><![CDATA[<p>Falls WaitForMultipleObjects zurückkehrt: welchen Wert liefert es und ggf. was liefert GetLastError?<br />
Füllst du auch noch irgendwo das 2. Element von dwChangeHandles? Falls du nur ein Verzeichnis hast kannst du auch gleich WaitForSingleObject nehmen.</p>
<p>RefreshDirectory ist einfach eine Funktion, in der du z.B. ein List- oder Tree-View entsprechend aktualisieren kannst, sodass es dir Änderung anzeigt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/533228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/533228</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 04 Jun 2004 21:01:13 GMT</pubDate></item><item><title><![CDATA[Reply to FindFirstChangeNotification Problem on Fri, 04 Jun 2004 21:02:55 GMT]]></title><description><![CDATA[<p>housefreak schrieb:</p>
<blockquote>
<p>Wieso erkennt das Programm nicht, wenn ich in den Ordner eine Datei kopiere oder wenn ich die Datei ändere?</p>
</blockquote>
<p>Woher weist du das? Ich sehe nämlich nicht, wo du bei Fund irgendetwas unternimmst, sodass du dies feststellen könntest <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/533229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/533229</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 04 Jun 2004 21:02:55 GMT</pubDate></item></channel></rss>