<?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[kann dll nicht laden]]></title><description><![CDATA[<p>Hallo C++ Profis,</p>
<p>ich versuche schon seit Tagen eine Message-Box per dll aufzurufen. Klappt nicht.<br />
Tutorials und FAQ schon gelesen. Hilft nicht. Offenbar Hopfen und Malz verloren.<br />
Wie geht das denn nun ???? Mit folgendem Programm versuche ich die DLL aufzurufen:</p>
<pre><code>//main.cpp
#include &lt;windows.h&gt;
typedef void(* HelloWorldPROC)();
int WINAPI WinMain (HINSTANCE hinst,
                    HINSTANCE hInstPrev,
                    LPSTR lpCmdLine,
                    int nCmdShow)
{
    HMODULE hMyLib;
    HelloWorldPROC pfnHelloWorld = NULL; 
    hMyLib = LoadLibrary(&quot;CDLL.dll&quot;);
    pfnHelloWorld = (HelloWorldPROC)GetProcAddress(hMyLib,&quot;_HelloWorld&quot;);
    pfnHelloWorld();
    FreeLibrary(hMyLib);
    return 0;
}
</code></pre>
<p>Die dll soll folgende Funktion enthalten:</p>
<pre><code>DLLEXPORT void HelloWorld ()
{
    MessageBox (GetActiveWindow(), &quot;Hello World from DLL!\n&quot;, &quot;Hi&quot;,
     MB_ICONINFORMATION);
}
</code></pre>
<p>Entweder es hagelt Fehlermeldungen oder es gibt keine Fehlermeldung, jedoch poppt dann das Fenster nicht auf. Kann mir jemand helfen ? Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/71196/kann-dll-nicht-laden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 17:19:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/71196.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Apr 2004 20:15:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to kann dll nicht laden on Thu, 15 Apr 2004 20:15:54 GMT]]></title><description><![CDATA[<p>Hallo C++ Profis,</p>
<p>ich versuche schon seit Tagen eine Message-Box per dll aufzurufen. Klappt nicht.<br />
Tutorials und FAQ schon gelesen. Hilft nicht. Offenbar Hopfen und Malz verloren.<br />
Wie geht das denn nun ???? Mit folgendem Programm versuche ich die DLL aufzurufen:</p>
<pre><code>//main.cpp
#include &lt;windows.h&gt;
typedef void(* HelloWorldPROC)();
int WINAPI WinMain (HINSTANCE hinst,
                    HINSTANCE hInstPrev,
                    LPSTR lpCmdLine,
                    int nCmdShow)
{
    HMODULE hMyLib;
    HelloWorldPROC pfnHelloWorld = NULL; 
    hMyLib = LoadLibrary(&quot;CDLL.dll&quot;);
    pfnHelloWorld = (HelloWorldPROC)GetProcAddress(hMyLib,&quot;_HelloWorld&quot;);
    pfnHelloWorld();
    FreeLibrary(hMyLib);
    return 0;
}
</code></pre>
<p>Die dll soll folgende Funktion enthalten:</p>
<pre><code>DLLEXPORT void HelloWorld ()
{
    MessageBox (GetActiveWindow(), &quot;Hello World from DLL!\n&quot;, &quot;Hi&quot;,
     MB_ICONINFORMATION);
}
</code></pre>
<p>Entweder es hagelt Fehlermeldungen oder es gibt keine Fehlermeldung, jedoch poppt dann das Fenster nicht auf. Kann mir jemand helfen ? Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/502242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/502242</guid><dc:creator><![CDATA[NullAhnung]]></dc:creator><pubDate>Thu, 15 Apr 2004 20:15:54 GMT</pubDate></item><item><title><![CDATA[Reply to kann dll nicht laden on Thu, 15 Apr 2004 20:19:51 GMT]]></title><description><![CDATA[<p>1. Rückgabewert von LoadLibrary testen<br />
2. Rückgabewert von GetProcAddress testen<br />
3. Mit DependencyWalker den Funktionsnamen checken, ob die Funktion wirklich als &quot;_HelloWorld&quot; exportiert wurde</p>
]]></description><link>https://www.c-plusplus.net/forum/post/502244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/502244</guid><dc:creator><![CDATA[3 Schritte zum Erfolg]]></dc:creator><pubDate>Thu, 15 Apr 2004 20:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to kann dll nicht laden on Thu, 15 Apr 2004 20:26:26 GMT]]></title><description><![CDATA[<p>Vielen Dank. Soweit bin ich noch nicht. Ein kleines Beispiel würde helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/502247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/502247</guid><dc:creator><![CDATA[NullAhnung]]></dc:creator><pubDate>Thu, 15 Apr 2004 20:26:26 GMT</pubDate></item><item><title><![CDATA[Reply to kann dll nicht laden on Thu, 15 Apr 2004 20:31:49 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">hMyLib = LoadLibrary(&quot;CDLL.dll&quot;);
if(hMyLib == NULL)
{
   // Fehlermeldung ausgeben
}

pfnHelloWorld = (HelloWorldPROC)GetProcAddress(hMyLib,&quot;_HelloWorld&quot;);

if(pfnHelloWorld == NULL)
{
   // Fehlermeldung ausgeben
}
</code></pre>
<p>DependencyWalker bekommst du hier: <a href="http://www.dependencywalker.com/" rel="nofollow">http://www.dependencywalker.com/</a></p>
<p>Dort die DLL einladen und gucken wie der Funktionsname wirklich heißt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/502253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/502253</guid><dc:creator><![CDATA[333]]></dc:creator><pubDate>Thu, 15 Apr 2004 20:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to kann dll nicht laden on Thu, 15 Apr 2004 20:40:52 GMT]]></title><description><![CDATA[<p>Super ! Ich werde mir das am Wochenende nochmal in Ruhe ansehen. Melde mich dann, ob und wie es geklappt hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/502258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/502258</guid><dc:creator><![CDATA[NullAhnung]]></dc:creator><pubDate>Thu, 15 Apr 2004 20:40:52 GMT</pubDate></item><item><title><![CDATA[Reply to kann dll nicht laden on Mon, 19 Apr 2004 12:12:58 GMT]]></title><description><![CDATA[<p>.... war HelloWorld und nicht _HelloWorld. Nochmals Dank.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/504317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/504317</guid><dc:creator><![CDATA[NullAhnung]]></dc:creator><pubDate>Mon, 19 Apr 2004 12:12:58 GMT</pubDate></item></channel></rss>