<?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[von einer dynamischen dll funktionen des hauptprogrammes aufrufen...]]></title><description><![CDATA[<p>hallo,<br />
so langsam komme ich mit dem thema dynamische dll weiter... allerdings frage ich mich, ob es möglich ist, auch funktionen aus dem hauptprogramm aufzurufen....</p>
<p>wenn in der exe eine funktion &quot;mache piep&quot; existiert.... wie kriegt man es hin, dass die dll diese funktion aufrufen kann (gleiches gilt für variablen) ?</p>
<p>geht sowas überhaupt uns wenn ja, wie ?</p>
<p>gruß<br />
rml</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/84539/von-einer-dynamischen-dll-funktionen-des-hauptprogrammes-aufrufen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 18:39:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/84539.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Aug 2004 11:39:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to von einer dynamischen dll funktionen des hauptprogrammes aufrufen... on Tue, 31 Aug 2004 11:39:45 GMT]]></title><description><![CDATA[<p>hallo,<br />
so langsam komme ich mit dem thema dynamische dll weiter... allerdings frage ich mich, ob es möglich ist, auch funktionen aus dem hauptprogramm aufzurufen....</p>
<p>wenn in der exe eine funktion &quot;mache piep&quot; existiert.... wie kriegt man es hin, dass die dll diese funktion aufrufen kann (gleiches gilt für variablen) ?</p>
<p>geht sowas überhaupt uns wenn ja, wie ?</p>
<p>gruß<br />
rml</p>
]]></description><link>https://www.c-plusplus.net/forum/post/595981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/595981</guid><dc:creator><![CDATA[RML]]></dc:creator><pubDate>Tue, 31 Aug 2004 11:39:45 GMT</pubDate></item><item><title><![CDATA[Reply to von einer dynamischen dll funktionen des hauptprogrammes aufrufen... on Tue, 31 Aug 2004 12:15:43 GMT]]></title><description><![CDATA[<p>Du könntest der DLL einfach die Adressen der Funktionen übergeben die sie aufrufen soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/596028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/596028</guid><dc:creator><![CDATA[SirLant]]></dc:creator><pubDate>Tue, 31 Aug 2004 12:15:43 GMT</pubDate></item><item><title><![CDATA[Reply to von einer dynamischen dll funktionen des hauptprogrammes aufrufen... on Tue, 31 Aug 2004 13:15:10 GMT]]></title><description><![CDATA[<p>hmmm - ich habe mal etwas die suchenfunktion benutzt und bin dabei hierauf gestossen. ich denke, du meinst das:</p>
<pre><code>float Plus(float a,float b){return a+b;} 
float Minus(float a,float b){return a-b;} 

    typedef float(*pt2Func)(float, float); 

   // function takes a char and returns a function pointer which is defined as a 
   // type above. &lt;opCode&gt; specifies which function to return 
   pt2Func GetPtr2(const char opCode) 
   { 
      if(opCode == '+')  return &amp;Plus; 
      if(opCode == '-')  return &amp;Minus; 
   } 

   // execute example code 
   void Return_A_Function_Pointer() 
   { 
      cout &lt;&lt; endl &lt;&lt; &quot;Executing 'Return_A_Function_Pointer'&quot; &lt;&lt; endl; 

      float (*pt2Function)(float, float);     // define a function pointer 

      pt2Function=GetPtr1('+');               // get function pointer from function 'GetPtr1' 
      cout &lt;&lt; pt2Function(2, 4) &lt;&lt; endl;      // call function using the pointer 

      pt2Function=GetPtr2('-');               // get function pointer from function 'GetPtr2' 
      cout &lt;&lt; pt2Function(2, 4) &lt;&lt; endl;      // call function using the pointer 
   }
</code></pre>
<p>ich werde es mir morgen mal zu gemüte führen, ob das klappt...<br />
kannst du mir sagen, ob man so auch eine klasse übergibt und somit alle klassenfunktionen mit einer adresse benutzen kann, oder muss für jede klassenfunktion eine eigene adresse &quot;benutzt&quot; werden ?</p>
<p>dank dir auf jeden fall schonmal für den tip <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>gruss<br />
rml</p>
]]></description><link>https://www.c-plusplus.net/forum/post/596096</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/596096</guid><dc:creator><![CDATA[RML]]></dc:creator><pubDate>Tue, 31 Aug 2004 13:15:10 GMT</pubDate></item><item><title><![CDATA[Reply to von einer dynamischen dll funktionen des hauptprogrammes aufrufen... on Wed, 01 Sep 2004 11:59:00 GMT]]></title><description><![CDATA[<p>Wenn ich SirLant richtig verstanden habe, so ähnlich:<br />
Du hast in der DLL eine Funktion, der du einen Funktions-Pointer als Parameter übergibst (rufst du in der exe auf) - in der DLL rufst du dann über diesen Pointer die Funktion aus der exe auf <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="🙂"
    /><br />
Ansonsten kann man glaub' auch auch exe-Files Funktionen exportieren, oder verwechsel ich da gerade etwas <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/596896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/596896</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 01 Sep 2004 11:59:00 GMT</pubDate></item></channel></rss>