<?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 bzw Plugin]]></title><description><![CDATA[<p>Hallo<br />
Ich habe ein Programm das Daten ......<br />
Nun möchte ich neue Funktionen in Form einer DLL (Plugin) hinzufügen.</p>
<p>Frage:<br />
Wie schreibe ich mein Prog. um das es zB. Beim Start alle DLLs findet; dann die MenüEinträge ändert und dann auch noch die vorhandenen Funktionen auf Menü-Click ausführt?</p>
<p>Ohne das Header,DEF oder LIB Datei der DLL in das Programm eingebunden sind!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/220252/dll-bzw-plugin</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 02:01:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220252.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Aug 2008 15:44:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 15:44:47 GMT]]></title><description><![CDATA[<p>Hallo<br />
Ich habe ein Programm das Daten ......<br />
Nun möchte ich neue Funktionen in Form einer DLL (Plugin) hinzufügen.</p>
<p>Frage:<br />
Wie schreibe ich mein Prog. um das es zB. Beim Start alle DLLs findet; dann die MenüEinträge ändert und dann auch noch die vorhandenen Funktionen auf Menü-Click ausführt?</p>
<p>Ohne das Header,DEF oder LIB Datei der DLL in das Programm eingebunden sind!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564200</guid><dc:creator><![CDATA[_Maxx175]]></dc:creator><pubDate>Wed, 13 Aug 2008 15:44:47 GMT</pubDate></item><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 15:45:53 GMT]]></title><description><![CDATA[<p>LoadLibrary, GetProcAddress, etc.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564204</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564204</guid><dc:creator><![CDATA[doc.dope]]></dc:creator><pubDate>Wed, 13 Aug 2008 15:45:53 GMT</pubDate></item><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 15:53:04 GMT]]></title><description><![CDATA[<p>Schnelle Antwort:</p>
<p>ist mir schon Klar:</p>
<pre><code>Main.c
</code></pre>
<pre><code class="language-cpp">typedef void (*function1_ptr) ();
static function1_ptr function1=NULL;

HMODULE hm = LoadLibrary(&quot;dll.dll&quot;); 
		if(hm)
		function1 = (function1_ptr)GetProcAddress  (hm,&quot;_DllFunction1@4&quot;);
</code></pre>
<pre><code>dll.c
</code></pre>
<pre><code class="language-cpp">EXPORT void DllFunction1(LPSTR message)
</code></pre>
<p>Nun in diesem Fall kenne ich ja den FunktionsNamen<br />
aber wenn nicht?<br />
Wie bekomme ich die Funktion und die Parameter?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564211</guid><dc:creator><![CDATA[_Maxx175]]></dc:creator><pubDate>Wed, 13 Aug 2008 15:53:04 GMT</pubDate></item><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 16:04:23 GMT]]></title><description><![CDATA[<p>Wie meinst du das? Du mußt dir halt eine Schnittstelle ausdenken für dein Pluginsystem. Eine Plugin DLL muss dann Funktionen mit festgelegten Namen und Signaturen exportieren, die dein Programm dann mit GetProcAddress laden kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564215</guid><dc:creator><![CDATA[doc.dope]]></dc:creator><pubDate>Wed, 13 Aug 2008 16:04:23 GMT</pubDate></item><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 16:25:38 GMT]]></title><description><![CDATA[<p>Meinte das so in etwa so<br />
<a href="http://www.codeproject.com/KB/DLL/Execute_DLL_Function.aspx" rel="nofollow">http://www.codeproject.com/KB/DLL/Execute_DLL_Function.aspx</a><br />
verstehe leider kein c++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564225</guid><dc:creator><![CDATA[_Maxx175]]></dc:creator><pubDate>Wed, 13 Aug 2008 16:25:38 GMT</pubDate></item><item><title><![CDATA[Reply to DLL bzw Plugin on Wed, 13 Aug 2008 16:57:23 GMT]]></title><description><![CDATA[<p>Naja was der Typ da macht hört sich nach ziemlichem Gehacke an, davon würde ich eher abraten. Aber die grundlegenden Schritte, die du durchführen musst, beschreibt er ja gleich am Anfang</p>
<blockquote>
<p>* Load the DLL: Since LoadLibrary has LPCTSTR type parameter for DLL name to load, just get string input from user and pass to it.<br />
* Get the function pointer: Here also, GetProcAddress has LPCTSTR type parameter for function name to pass, get string input from user and pass to it.<br />
* Pass the parameters: Here comes the problem. Compiler, in most cases, passes arguments to function through stack. Try to simulate the compiler, get the parameter types from user in addition to the parameter values. Align &amp; push the parameters in to the stack.<br />
* Call the function: jump to the function using the function pointer that is obtained through GetProcAddress.<br />
* Get the return value: Get the return type from user. Function always returns 32 bit value (except in 64 bit applications) in a register. Get this value and type cast into the type specified by the user.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1564236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564236</guid><dc:creator><![CDATA[doc.dope]]></dc:creator><pubDate>Wed, 13 Aug 2008 16:57:23 GMT</pubDate></item></channel></rss>