<?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[CreateThread]]></title><description><![CDATA[<p>hallo ich habe angefangen mich mit threads zu beschäftigen fand auch ein super tutorial mit beispielen.<br />
Aber ich verstehe eine Zeile nicht ganz so:</p>
<pre><code class="language-cpp">HANDLE hThread[MAX_THREADS]; 
DWORD dwThreadID[MAX_THREADS]; 

   ... ... ... 

for (int index=0; index&lt;MAX_THREADS;index++) 
{ 
   hThread[index] = CreateThread( NULL, 
                                  0, 
                                  ThreadFunc, 
                                  (LPVOID)index, 
                                  0, 
                                  &amp;dwThread[index] 
                                 ); 
}
</code></pre>
<p>Was hat das</p>
<blockquote>
<p>(LPVOID)</p>
</blockquote>
<p>für eine Bedeutung.</p>
<p>In dem Tutorial wird der Parameter so beschrieben:</p>
<blockquote>
<p>LPTHREAD_START_ROUTINE lpStartAdress - Hier wird die Adresse der Funktion angegeben, die der Thread beim Start aufrufen soll.</p>
</blockquote>
<p>Weiß nicht so recht weiter.<br />
Hoffe auf Antworten.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/217569/createthread</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 12:41:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/217569.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Jul 2008 19:43:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CreateThread on Tue, 08 Jul 2008 19:43:00 GMT]]></title><description><![CDATA[<p>hallo ich habe angefangen mich mit threads zu beschäftigen fand auch ein super tutorial mit beispielen.<br />
Aber ich verstehe eine Zeile nicht ganz so:</p>
<pre><code class="language-cpp">HANDLE hThread[MAX_THREADS]; 
DWORD dwThreadID[MAX_THREADS]; 

   ... ... ... 

for (int index=0; index&lt;MAX_THREADS;index++) 
{ 
   hThread[index] = CreateThread( NULL, 
                                  0, 
                                  ThreadFunc, 
                                  (LPVOID)index, 
                                  0, 
                                  &amp;dwThread[index] 
                                 ); 
}
</code></pre>
<p>Was hat das</p>
<blockquote>
<p>(LPVOID)</p>
</blockquote>
<p>für eine Bedeutung.</p>
<p>In dem Tutorial wird der Parameter so beschrieben:</p>
<blockquote>
<p>LPTHREAD_START_ROUTINE lpStartAdress - Hier wird die Adresse der Funktion angegeben, die der Thread beim Start aufrufen soll.</p>
</blockquote>
<p>Weiß nicht so recht weiter.<br />
Hoffe auf Antworten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1543751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1543751</guid><dc:creator><![CDATA[Slyux]]></dc:creator><pubDate>Tue, 08 Jul 2008 19:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to CreateThread on Wed, 09 Jul 2008 16:02:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">/*deleted*/
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1543795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1543795</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Wed, 09 Jul 2008 16:02:29 GMT</pubDate></item><item><title><![CDATA[Reply to CreateThread on Tue, 08 Jul 2008 21:35:28 GMT]]></title><description><![CDATA[<p>Also ich wollte einfach ne erklärung keinen Code.<br />
-.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1543818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1543818</guid><dc:creator><![CDATA[Slyux]]></dc:creator><pubDate>Tue, 08 Jul 2008 21:35:28 GMT</pubDate></item><item><title><![CDATA[Reply to CreateThread on Wed, 09 Jul 2008 08:20:41 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">(LPVOID)
</code></pre>
<p>Ist ein Typ-Cast...<br />
LPVOID ist in dem falle ein Pointer vom Typ void...</p>
<p>Somit kannst du deine int-Variable an CreatThread übergeben, trotzdem da eigentlich eine Variable vom typ LPVOID erwartet wird...<br />
Casten ist öfters mal in benutzung..</p>
<p>Ich hoffe ich habe dir damit geholfen.. Ob alles 100% richtig ist weiß ich nicht aber im groben stimmt das schon xD</p>
<p>@Erhard Henkes: Sry aber Dein Code past gerade gar nicht, ist dir bewusst ne? Du bringst ein &quot;_beginthread&quot; wobei es um &quot;CreatThread&quot;.. nein eher um TYPECASTS geht.. <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>
<p>Wenn du ein Beispiel bringst solltest du eventuell was dazu schreiben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1543973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1543973</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 09 Jul 2008 08:20:41 GMT</pubDate></item></channel></rss>