<?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[dll: grundlegende Fragen]]></title><description><![CDATA[<p>Hi,<br />
ich bin dabei mal wieder was mit C++ zu machen.<br />
(Komme von Delphi)<br />
Dort habe ich schon ein paar mal mit dll gearbeitet.</p>
<p>Nun möchte ich das gleiche auch mit c++.</p>
<p>Also Tut gesucht! Tut gefunden!<br />
<a href="http://bcb-tutorial.c-plusplus.net/DLL_Tutorial/artikel5.html" rel="nofollow">http://bcb-tutorial.c-plusplus.net/DLL_Tutorial/artikel5.html</a><br />
Leider ist das ein Builder Tutorial.</p>
<p>Ich arbeite mit Dev C++.</p>
<p>Nun verstehe ich zunächst nich, was</p>
<pre><code class="language-cpp">BOOL APIENTRY DllMain (HINSTANCE hInst     /* Library instance handle. */ ,
                       DWORD reason        /* Reason this function is being called. */ ,
                       LPVOID reserved     /* Not used. */ )
{
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
        break;

      case DLL_PROCESS_DETACH:
        break;

      case DLL_THREAD_ATTACH:
        break;

      case DLL_THREAD_DETACH:
        break;
    }

    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
}
</code></pre>
<p>Diese Funktion macht?</p>
<p>Thx schon mal für die Hilfe <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="😃"
    /></p>
<p>MFG Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/147725/dll-grundlegende-fragen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 01:02:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/147725.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 May 2006 11:47:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 11:47:12 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich bin dabei mal wieder was mit C++ zu machen.<br />
(Komme von Delphi)<br />
Dort habe ich schon ein paar mal mit dll gearbeitet.</p>
<p>Nun möchte ich das gleiche auch mit c++.</p>
<p>Also Tut gesucht! Tut gefunden!<br />
<a href="http://bcb-tutorial.c-plusplus.net/DLL_Tutorial/artikel5.html" rel="nofollow">http://bcb-tutorial.c-plusplus.net/DLL_Tutorial/artikel5.html</a><br />
Leider ist das ein Builder Tutorial.</p>
<p>Ich arbeite mit Dev C++.</p>
<p>Nun verstehe ich zunächst nich, was</p>
<pre><code class="language-cpp">BOOL APIENTRY DllMain (HINSTANCE hInst     /* Library instance handle. */ ,
                       DWORD reason        /* Reason this function is being called. */ ,
                       LPVOID reserved     /* Not used. */ )
{
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
        break;

      case DLL_PROCESS_DETACH:
        break;

      case DLL_THREAD_ATTACH:
        break;

      case DLL_THREAD_DETACH:
        break;
    }

    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
}
</code></pre>
<p>Diese Funktion macht?</p>
<p>Thx schon mal für die Hilfe <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="😃"
    /></p>
<p>MFG Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060872</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Fri, 19 May 2006 11:47:12 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 12:23:37 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/en-us/dllproc/base/dllmain.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/dllproc/base/dllmain.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060923</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 19 May 2006 12:23:37 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 15:42:50 GMT]]></title><description><![CDATA[<p>OK Thx.<br />
Noch ne Frage:<br />
Woher weiß das Programm welche DLL es einbinden soll, wenn ich die<br />
DLL so einbinde:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
__declspec (dllexport) int AddVals(int x, int y) //int __declspec(dllexport) AddVals(int x, int y)
{
    return x + y;
}
//---------------------------------------------------------------------------
__declspec (dllexport) int SubVals(int x, int y)
{
    return x - y;
}
</code></pre>
<p>??</p>
<p>Und warum brauche ich einen Header?</p>
<p>THX<br />
MFG Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1061093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061093</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Fri, 19 May 2006 15:42:50 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 15:49:30 GMT]]></title><description><![CDATA[<p>[quote=&quot;AceKiller73&quot;]Woher weiß das Programm welche DLL es einbinden soll, wenn ich die DLL so einbinde:</p>
<pre><code class="language-cpp">__declspec (dllexport) int AddVals
</code></pre>
<p>Hier bindest Du doch keine DLL ein! Sondern hier exportierst Du Funktionen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1061100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061100</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 19 May 2006 15:49:30 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 16:43:31 GMT]]></title><description><![CDATA[<p>Ahhh<br />
LOL<br />
falscher Code<br />
Ich meinte, wenn ich die Funktion im Header stehen hab.</p>
<pre><code class="language-cpp">__declspec (dllexport) int AddVals(int, int); //Exportdeklaration in Header-Datei.
</code></pre>
<p>Ich verstehe nicht ganz wie das funzt.<br />
In Delphi musst ich immer den Dll namen angeben.<br />
Muss ich hier doch bestimmt auch.<br />
Nur wo?</p>
<p>MFG Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1061146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061146</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Fri, 19 May 2006 16:43:31 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 19:01:05 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the TEST_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// TEST_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef TEST_EXPORTS
#define TEST_API __declspec(dllexport)
#else
#define TEST_API __declspec(dllimport)
#endif

TEST_API int fnTest(void);
</code></pre>
<p>Du musst nicht den Namen der DLL irgendwo angeben. Wenn du die DLL erstellst, wird auch eine .lib Datei erstellt gegen die du dein Programm dann linkst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1061211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061211</guid><dc:creator><![CDATA[WebNubbi]]></dc:creator><pubDate>Fri, 19 May 2006 19:01:05 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 19:44:07 GMT]]></title><description><![CDATA[<p>Dumme Frage, aber wie linke ich die Datei.<br />
Unter Projekt&gt;Optionen&gt; und da dann weiter oder wie?<br />
Zudem finde ich keine Lib Datei.</p>
<p>MFG Ace</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1061241</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061241</guid><dc:creator><![CDATA[AceKiller73]]></dc:creator><pubDate>Fri, 19 May 2006 19:44:07 GMT</pubDate></item><item><title><![CDATA[Reply to dll: grundlegende Fragen on Fri, 19 May 2006 20:25:43 GMT]]></title><description><![CDATA[<p>Verwende folgendes im Code:</p>
<pre><code class="language-cpp">#pragma comment(lib, &quot;name-der.lib&quot;)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1061271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1061271</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 19 May 2006 20:25:43 GMT</pubDate></item></channel></rss>