<?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[Problem mit DLL! Eigene DLL benutzen]]></title><description><![CDATA[<p>Ich hab von Dev-C++ eine DLL (die schon vom Programm vorgeschrieben ist) erstellt.<br />
dllmain.c</p>
<pre><code>/* Replace &quot;dll.h&quot; with the name of your header */
#include &quot;dll.h&quot;
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

DLLIMPORT void HelloWorld ()
{
    MessageBox (0, &quot;Hello World from DLL!\n&quot;, &quot;Hi&quot;, MB_ICONINFORMATION);
}

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>dll.h</p>
<pre><code>#ifndef _DLL_H_
#define _DLL_H_

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */

DLLIMPORT void HelloWorld (void);

#endif /* _DLL_H_ */
</code></pre>
<p>Wie kann ich jetzt die DLL in ein anderem Projekt in MSC++ 6.0 benutzen?</p>
<p>Mit freundlichen Grüßen</p>
<p>DarkShadow17</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/72753/problem-mit-dll-eigene-dll-benutzen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 18:16:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/72753.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 May 2004 08:21:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit DLL! Eigene DLL benutzen on Sun, 02 May 2004 08:21:52 GMT]]></title><description><![CDATA[<p>Ich hab von Dev-C++ eine DLL (die schon vom Programm vorgeschrieben ist) erstellt.<br />
dllmain.c</p>
<pre><code>/* Replace &quot;dll.h&quot; with the name of your header */
#include &quot;dll.h&quot;
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

DLLIMPORT void HelloWorld ()
{
    MessageBox (0, &quot;Hello World from DLL!\n&quot;, &quot;Hi&quot;, MB_ICONINFORMATION);
}

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>dll.h</p>
<pre><code>#ifndef _DLL_H_
#define _DLL_H_

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */

DLLIMPORT void HelloWorld (void);

#endif /* _DLL_H_ */
</code></pre>
<p>Wie kann ich jetzt die DLL in ein anderem Projekt in MSC++ 6.0 benutzen?</p>
<p>Mit freundlichen Grüßen</p>
<p>DarkShadow17</p>
]]></description><link>https://www.c-plusplus.net/forum/post/512692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/512692</guid><dc:creator><![CDATA[DarkShadow17]]></dc:creator><pubDate>Sun, 02 May 2004 08:21:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DLL! Eigene DLL benutzen on Sun, 02 May 2004 09:19:09 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=547" rel="nofollow">Shade Of Mine</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=10" rel="nofollow">ANSI C</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC mit dem Visual C++</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/512707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/512707</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 02 May 2004 09:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DLL! Eigene DLL benutzen on Sun, 02 May 2004 12:36:14 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &quot;dll.h&quot;

#pragma comment(lib,dll.lib)

int main()
{
  HelloWorld();
return 0;
}
</code></pre>
<p>die dateien dll.h und dll.lib müssen natürlich auffindbar sein (z.b. gleicher ordner wie das andere programm)</p>
<p>dll.lib sollte automatisch erstellt worden sein als du deine dll kompiliert hast</p>
]]></description><link>https://www.c-plusplus.net/forum/post/512850</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/512850</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Sun, 02 May 2004 12:36:14 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DLL! Eigene DLL benutzen on Sun, 02 May 2004 14:46:15 GMT]]></title><description><![CDATA[<p>Danke.<br />
Die Lib-Datei wird aber nur dann erstellt wenn ich statt dllimport dllexport mache. Wo liegt da eigentlich der unterchied zwischen den beiden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/512915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/512915</guid><dc:creator><![CDATA[DarkShadow17]]></dc:creator><pubDate>Sun, 02 May 2004 14:46:15 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DLL! Eigene DLL benutzen on Sun, 02 May 2004 22:31:54 GMT]]></title><description><![CDATA[<p>alle funktionen mit dllexport werden exportiert und alle mit import werden importiert<br />
is das nich offensichtlich?</p>
<p>in der dll musst du also dllexport benutzen und in der exe oder ner anderen dll dllimport <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>
]]></description><link>https://www.c-plusplus.net/forum/post/513161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/513161</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Sun, 02 May 2004 22:31:54 GMT</pubDate></item></channel></rss>