<?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[frage: dll load]]></title><description><![CDATA[<p>fogende zusammenfassung von mir, weiss ich ob die richtig ist:<br />
dll muss man immer dynamisch link, es gibt keine statisch gelinkte dlls.<br />
man redet nur von implizit od explizit linken.<br />
wenn man dll implizit linken will, braucht man 3 Datei. &quot;.dll&quot;, &quot;.lib&quot;, &quot;.h&quot;<br />
die funktionen in dll fangen mit __declspec().<br />
bei explizit linken muss die dll dllmain einbauen.<br />
wenn ich habe eine fremde dll, ohne .h und .lib, wie kann ich dann verwenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/110452/frage-dll-load</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 05:44:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/110452.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 May 2005 18:45:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to frage: dll load on Fri, 20 May 2005 18:45:38 GMT]]></title><description><![CDATA[<p>fogende zusammenfassung von mir, weiss ich ob die richtig ist:<br />
dll muss man immer dynamisch link, es gibt keine statisch gelinkte dlls.<br />
man redet nur von implizit od explizit linken.<br />
wenn man dll implizit linken will, braucht man 3 Datei. &quot;.dll&quot;, &quot;.lib&quot;, &quot;.h&quot;<br />
die funktionen in dll fangen mit __declspec().<br />
bei explizit linken muss die dll dllmain einbauen.<br />
wenn ich habe eine fremde dll, ohne .h und .lib, wie kann ich dann verwenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792652</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792652</guid><dc:creator><![CDATA[netrobot]]></dc:creator><pubDate>Fri, 20 May 2005 18:45:38 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 20 May 2005 19:22:58 GMT]]></title><description><![CDATA[<p>z.B. so</p>
<pre><code class="language-cpp">typedef void __stdcall NSend(String Server,String Empf,String Abse,String Txt,int Len); 
HINSTANCE h = LoadLibrary(&quot;netapi32.dll&quot;); //weist der dll ein handle zu (h)
NSend* NetS=(NSend*)GetProcAddress;
</code></pre>
<p>wenns nie richtig ist bitte mal richtig stellen! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> hat aber funktioniert</p>
<p>LoadLibrary läd die dll und weist dem &quot;h&quot; das handle dieser zu. wenn die dll nicht geladen werden kann ist &quot;h&quot; =0 !</p>
<p>GetProcAdress gibt dir den Zugriff auf die in der DLL vorhandene Funktion (h,&quot;<strong>NetMessageBufferSend</strong>&quot;) ist diese funktion nicht vorhanden ist der wert 0 !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792664</guid><dc:creator><![CDATA[ink3n]]></dc:creator><pubDate>Fri, 20 May 2005 19:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 20 May 2005 19:54:07 GMT]]></title><description><![CDATA[<p>1. war meine zusammenfassung richtig?<br />
2. muss ich mich auf welche einstellung von VC achten?<br />
z.B. muss ich dann dll zu project hinzufügen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792676</guid><dc:creator><![CDATA[netrobot]]></dc:creator><pubDate>Fri, 20 May 2005 19:54:07 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 20 May 2005 21:17:45 GMT]]></title><description><![CDATA[<p>netrobot schrieb:</p>
<blockquote>
<p>1. war meine zusammenfassung richtig?</p>
</blockquote>
<p>Naja, so genau lässt sich das nicht sagen. Ist alles etwas konfus. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>[C++ Offtopic]</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>dll muss man immer dynamisch link, es gibt keine statisch gelinkte dlls.</p>
</blockquote>
<p>Das ist richtig. Deshalb heisst es ja auch <strong>Dynamic</strong> Link Library.<br />
Grundsätzlich gibt es zwei Arten von Librarys, statische und dynamische. DLLs gehören sozusagen zur dynamische Fraktion. Leider werden manchmal bei DLLs selbst die Begriffe statisch und dynamisch verwendet, und zwar wenn es um das Laden selbiger geht. Allerdings ist die Benutzung der Begriffe etwas irreführend. Besser ist da, von load time linking (implizit) und run time linking (explizit) zu sprechen.</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>wenn man dll implizit linken will, braucht man 3 Datei. &quot;.dll&quot;, &quot;.lib&quot;, &quot;.h&quot;</p>
</blockquote>
<p>Die .dll brauchst du immer, aber erst zur Laufzeit. Fürs Programmieren selbst sind lediglich .lib und .h von Interesse. Die .lib Datei wird allerdings nur beim impliziten Linken benötigt.</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>die funktionen in dll fangen mit __declspec()</p>
</blockquote>
<p>Was du uns damit sagen willst, ist mir ehrlich gesagt schleierhaft. __declspec(dllexport) verwendet man, um dem Compiler mitzuteilen, dass die Definition der Funktion in einer DLL stehen wird, und dass in der .lib Datei entsprechende Infos generiert werden sollen, damit das implizite Linken funktioniert. Notwendig ist __declspec(dllexport) aber nicht unbedingt, du könntest dafür zB auch eine DEF Datei verwenden.</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>bei explizit linken muss die dll dllmain einbauen</p>
</blockquote>
<p>Nein, eine dllmain brauchst du immer. Denn egal ob du implizit oder explizit linkst, die DLL muss auf jedenfall geladen werden. Und dann kommt dllmain (oder wie immer du den Einsprungspunkt definierst) ins Spiel.</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>wenn ich habe eine fremde dll, ohne .h und .lib, wie kann ich dann verwenden?</p>
</blockquote>
<p>Gar nicht. Zumindest den Namen und die Signatur der verwendeten Funktionen musst du schon kennen.</p>
<p>netrobot schrieb:</p>
<blockquote>
<p>2. muss ich mich auf welche einstellung von VC achten?<br />
z.B. muss ich dann dll zu project hinzufügen?</p>
</blockquote>
<p>Nein. Wie bereits erwähnt, ist die DLL Datei fürs Programmieren selbst nicht von Bedeutung.</p>
<p>[/C++ Offtopic]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792707</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Fri, 20 May 2005 21:17:45 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 20 May 2005 21:36:17 GMT]]></title><description><![CDATA[<p>vielen dank</p>
<blockquote>
<p>Nein, eine dllmain brauchst du immer. Denn egal ob du implizit oder explizit linkst, die DLL muss auf jedenfall geladen werden. Und dann kommt dllmain (oder wie immer du den Einsprungspunkt definierst) ins Spiel.</p>
</blockquote>
<p>ich habe eine API geschrieben, dann das ganze als eine dll. vor jeder funktion schieb ich nur declspec (dllexport) (ohne dllmain, was ich nur mal gehört, verstanden habe ich noch nicht).Danach habe ich einfach die entsprechende lib in projekt <a href="http://xn--hinzufgt-c6a.Es" rel="nofollow">hinzufügt.Es</a> läuft einwandfrei.wieso?? Es ist implizit link, also ohne dllmain.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792715</guid><dc:creator><![CDATA[netrobot]]></dc:creator><pubDate>Fri, 20 May 2005 21:36:17 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Sat, 21 May 2005 09:28:51 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=8" rel="nofollow">Rund um die Programmierung</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/792812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792812</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 21 May 2005 09:28:51 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Sat, 21 May 2005 11:53:49 GMT]]></title><description><![CDATA[<p>netrobot schrieb:</p>
<blockquote>
<p>ich habe eine API geschrieben, dann das ganze als eine dll. vor jeder funktion schieb ich nur declspec (dllexport) (ohne dllmain, was ich nur mal gehört, verstanden habe ich noch nicht).Danach habe ich einfach die entsprechende lib in projekt <a href="http://xn--hinzufgt-c6a.Es" rel="nofollow">hinzufügt.Es</a> läuft einwandfrei.wieso?? Es ist implizit link, also ohne dllmain.</p>
</blockquote>
<p>Sry, da hab ich leider Blödsinn geschrieben. War mir bisher neu, dass dllmain optional ist.</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>The DllMain function is an optional entry point into a dynamic-link library (DLL). If the function is used, it is called by the system when processes and threads are initialized and terminated, or upon calls to the LoadLibrary and FreeLibrary functions.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/792905</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792905</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 21 May 2005 11:53:49 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Sat, 21 May 2005 13:06:14 GMT]]></title><description><![CDATA[<p>dllmain ist nur für mfc da?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792952</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792952</guid><dc:creator><![CDATA[netrobot]]></dc:creator><pubDate>Sat, 21 May 2005 13:06:14 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Sat, 21 May 2005 13:32:50 GMT]]></title><description><![CDATA[<p>Nein. Das Konzept der Dynamic Link Libraries hat mit MFC erstmal nichts zu tun. Du kannst dllmain zB dafür nutzen, um Ressourcen beim Laden zu allokieren und beim Entladen wieder freizugeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/792975</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/792975</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 21 May 2005 13:32:50 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 10 Jun 2005 12:00:07 GMT]]></title><description><![CDATA[<p>Bin bei der Suche für mein folgendes Problem auf dieses Forum gestoßen. Hoffe mir kann jemand helfen.</p>
<p>Ich habe eine Menge an Klssen mit zugehörigen Headern programmiert und will diese, bzw. das benötigte, nun in einer API mit DLL bereitstellen. declspec scheint nach allem was ich gelesen habe aber nur für Variablen, Konstanten und Funktionen zu funktionieren, aber nicht für Klassen und deren Methoden.<br />
Was muß ich tun, damit z.B. meine Singleton-Klasse Mainwindow in der API die Methode int Mainwindow::Init(.....); zur Verfügung stellt?</p>
<p>Bin für jede noch so kleine Hilfe dankbar, da dies meine erste API ist.</p>
<p>Danke, Ralph</p>
]]></description><link>https://www.c-plusplus.net/forum/post/806623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/806623</guid><dc:creator><![CDATA[Ralphs Probleme]]></dc:creator><pubDate>Fri, 10 Jun 2005 12:00:07 GMT</pubDate></item><item><title><![CDATA[Reply to frage: dll load on Fri, 10 Jun 2005 13:46:50 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=1819" rel="nofollow">kingruedi</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=8" rel="nofollow">Rund um die Programmierung</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/806737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/806737</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 10 Jun 2005 13:46:50 GMT</pubDate></item></channel></rss>