<?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[WaitForSingleObject() löst nicht aus]]></title><description><![CDATA[<p>Hallo,</p>
<p>Hab mir mit Createthread einen Thread erzeugt. Dieser funktioniert soweit auch prima. Wenn ich aber mit WaitForSingleObject darauf warte das der Thread beendet ist bekomme ich keinen Event.<br />
Mit TerminateThread(HANDLE) kann ich den Thread sofort unterbrechen. Dann reagiert auch WaitForSingleObject().</p>
<p>Hier die ThreadProc...</p>
<pre><code>DWORD WINAPI ThreadLanProc( LPVOID lpParameter ) {

	LAN *pLAN = (LAN*) lpParameter;

	pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread started&quot;);

	while( !pLAN-&gt;stopThread() ) {

		Sleep( 300 );

		pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread alive !!&quot;);

	} // while(...)

	pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread stopped&quot;);

	return 0;
};
</code></pre>
<p>Ist hier was falsch?</p>
<p>Danke für eure Hilfe</p>
<p>Dirk</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185556/waitforsingleobject-löst-nicht-aus</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 19:10:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185556.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Jun 2007 20:40:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WaitForSingleObject() löst nicht aus on Tue, 26 Jun 2007 20:40:53 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Hab mir mit Createthread einen Thread erzeugt. Dieser funktioniert soweit auch prima. Wenn ich aber mit WaitForSingleObject darauf warte das der Thread beendet ist bekomme ich keinen Event.<br />
Mit TerminateThread(HANDLE) kann ich den Thread sofort unterbrechen. Dann reagiert auch WaitForSingleObject().</p>
<p>Hier die ThreadProc...</p>
<pre><code>DWORD WINAPI ThreadLanProc( LPVOID lpParameter ) {

	LAN *pLAN = (LAN*) lpParameter;

	pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread started&quot;);

	while( !pLAN-&gt;stopThread() ) {

		Sleep( 300 );

		pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread alive !!&quot;);

	} // while(...)

	pLAN-&gt;writeLog(&quot;LAN &gt;&gt; Thread stopped&quot;);

	return 0;
};
</code></pre>
<p>Ist hier was falsch?</p>
<p>Danke für eure Hilfe</p>
<p>Dirk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314348</guid><dc:creator><![CDATA[dhoe]]></dc:creator><pubDate>Tue, 26 Jun 2007 20:40:53 GMT</pubDate></item><item><title><![CDATA[Reply to WaitForSingleObject() löst nicht aus on Wed, 27 Jun 2007 00:05:17 GMT]]></title><description><![CDATA[<p>Naja, wahrscheinlich liefert &quot;pLAN-&gt;stopThread()&quot; niemals &quot;true&quot; zurück, hm?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314428</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 27 Jun 2007 00:05:17 GMT</pubDate></item></channel></rss>