<?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[DllMain automatisch ausgeführt ? und wie oft ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>in Bezug auf folgende DLL Diskussion:</p>
<p><a href="http://www.c-plusplus.net/forum/viewtopic.php?t=63965&amp;highlight=dllmain" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=63965&amp;highlight=dllmain</a></p>
<p>Ich hätte trotzdem gerne gewusst, ob die DllMain bei Loadlibrary automatisch<br />
ausgeführt wird. Nachdem ich meine DLL von zwei Programmen mit Loadlibrary<br />
Lade, müsste diese Funktion ja praktisch 2mal ausgeführt werden, was bei<br />
einem Setzen von (shared) Variablen dumm wäre ...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/86300/dllmain-automatisch-ausgeführt-und-wie-oft</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 07:45:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/86300.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Sep 2004 15:01:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Fri, 17 Sep 2004 15:02:27 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>in Bezug auf folgende DLL Diskussion:</p>
<p><a href="http://www.c-plusplus.net/forum/viewtopic.php?t=63965&amp;highlight=dllmain" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=63965&amp;highlight=dllmain</a></p>
<p>Ich hätte trotzdem gerne gewusst, ob die DllMain bei Loadlibrary automatisch<br />
ausgeführt wird. Nachdem ich meine DLL von zwei Programmen mit Loadlibrary<br />
Lade, müsste diese Funktion ja praktisch 2mal ausgeführt werden, was bei<br />
einem Setzen von (shared) Variablen dumm wäre ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609338</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Fri, 17 Sep 2004 15:02:27 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Fri, 17 Sep 2004 15:22:31 GMT]]></title><description><![CDATA[<p>DllMain wird aufgerufen wenn die Dll in einem Prozess geladen/enlaten wird. Wenn ein Thread gestartet und beendet wird.</p>
<p>LoadLibrary überprüft erst ob die Dll schon mal geladen wurde. Nur dann wird diese geladen und DllMain aufgerufen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609366</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609366</guid><dc:creator><![CDATA[ScriptGod]]></dc:creator><pubDate>Fri, 17 Sep 2004 15:22:31 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Fri, 17 Sep 2004 16:50:26 GMT]]></title><description><![CDATA[<pre><code>Wenn ein Thread gestartet und beendet wird.
</code></pre>
<p>Meinst du damit eine Unterfunktion der Dll ?<br />
(also vor dem Ausführen einer Funktion kommt DllMain ?)</p>
<p>Ansonsten: Danke für die schnelle Antwort !!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609446</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609446</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Fri, 17 Sep 2004 16:50:26 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Fri, 17 Sep 2004 16:54:05 GMT]]></title><description><![CDATA[<blockquote>
<p>LoadLibrary überprüft erst ob die Dll schon mal geladen wurde.</p>
</blockquote>
<p>Aber nur pro Prozess, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609450</guid><dc:creator><![CDATA[porci]]></dc:creator><pubDate>Fri, 17 Sep 2004 16:54:05 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Fri, 17 Sep 2004 23:54:05 GMT]]></title><description><![CDATA[<p>Dlls sind Prozesse abhängig (auser shared sections), also ist das Überprüfen Prozess abhängig.</p>
<p>DllMain wird mit verschiedenen Reasons aufgerufen:<br />
DLL_PROCESS_ATTACH -&gt; DLL in ein Prozess geladen<br />
DLL_PROCESS_DETACH -&gt; DLL im Prozess entladen<br />
DLL_THREAD_ATTACH -&gt; neuer Thread im Prozess erstellt<br />
DLL_THREAD_DETACH -&gt; Thread im Prozess beendet</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609644</guid><dc:creator><![CDATA[ScriptGod]]></dc:creator><pubDate>Fri, 17 Sep 2004 23:54:05 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Sat, 18 Sep 2004 00:16:54 GMT]]></title><description><![CDATA[<p>Das mit dem attach und detach habe ich nun auch in meinder DLL.<br />
Nur das mit dem thread verstehe ich leider immer noch nicht.<br />
Ist die Erstellung eines DLL_THREAD_ATTACH durch GetProcAdress ?<br />
Oder handelt es sich um einen Aufruf einer Funktion der DLL<br />
(also Start und Ende eines Aufrufes einer Funktion in der DLL) ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609651</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609651</guid><dc:creator><![CDATA[thenoname]]></dc:creator><pubDate>Sat, 18 Sep 2004 00:16:54 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Sat, 18 Sep 2004 10:34:37 GMT]]></title><description><![CDATA[<p>Damit ist gemeint, wenn in deinem Prozess ein Thread gestartet wird, z.B. mit _beginThread(), dann wird der DLL bzw. allen DLLs in deinem Programm eine DLL_THREAD_ATTACH Nachricht geschickt, damit die eben bescheit wissen, weiß zwar kein Beispiel wo man das braucht, aber einfach aus Spaß wurde es sicher nicht so gemacht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609780</guid><dc:creator><![CDATA[SirLant]]></dc:creator><pubDate>Sat, 18 Sep 2004 10:34:37 GMT</pubDate></item><item><title><![CDATA[Reply to DllMain automatisch ausgeführt ? und wie oft ? on Sat, 18 Sep 2004 10:39:44 GMT]]></title><description><![CDATA[<p>SirLant schrieb:</p>
<blockquote>
<p>weiß zwar kein Beispiel wo man das braucht, aber einfach aus Spaß wurde es sicher nicht so gemacht.</p>
</blockquote>
<p>die dll kann dann z.b. für jeden thread eigene datenstrukturen anlegen, speicher allozieren usw.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/609785</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/609785</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 18 Sep 2004 10:39:44 GMT</pubDate></item></channel></rss>