<?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[Callback Funktionen]]></title><description><![CDATA[<p>Hi<br />
Ich habe eine Dll welche zum Beispiel Meldungen an die Anwendung zurückgeben will.<br />
Leider muss ich auf MFC verzichten da diese dll auch in anderen Projekten benutzt werden soll.</p>
<p>Jetzt habe ich gehört dass man so was über sog. callback Funktionen löst.</p>
<p>Ich habe aber keine Ahnung wie!?<br />
in der anwendung und Dll deklarieren ??<br />
Aufruf??</p>
<p>Danke für die Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/121014/callback-funktionen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 16:08:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/121014.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Sep 2005 07:14:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Callback Funktionen on Mon, 19 Sep 2005 07:14:44 GMT]]></title><description><![CDATA[<p>Hi<br />
Ich habe eine Dll welche zum Beispiel Meldungen an die Anwendung zurückgeben will.<br />
Leider muss ich auf MFC verzichten da diese dll auch in anderen Projekten benutzt werden soll.</p>
<p>Jetzt habe ich gehört dass man so was über sog. callback Funktionen löst.</p>
<p>Ich habe aber keine Ahnung wie!?<br />
in der anwendung und Dll deklarieren ??<br />
Aufruf??</p>
<p>Danke für die Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/875423</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875423</guid><dc:creator><![CDATA[Raffzen]]></dc:creator><pubDate>Mon, 19 Sep 2005 07:14:44 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Mon, 19 Sep 2005 07:21:32 GMT]]></title><description><![CDATA[<p>Eine Callbackfunktion ist eine Funktion die von wo anders her aufgerufen wird.</p>
<p>Also machste dir eben einen Funktionspointer und übergibst diesen der DLL.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/875428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875428</guid><dc:creator><![CDATA[hehejo]]></dc:creator><pubDate>Mon, 19 Sep 2005 07:21:32 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Mon, 19 Sep 2005 07:55:25 GMT]]></title><description><![CDATA[<p>Ich stehe heut glaub irgendwie mit beiden Füßen auf dem Schlauch!<br />
Wie übergebe ich einen Funktionpointer?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/875457</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875457</guid><dc:creator><![CDATA[Raffzen]]></dc:creator><pubDate>Mon, 19 Sep 2005 07:55:25 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Mon, 19 Sep 2005 08:19:09 GMT]]></title><description><![CDATA[<p>In dem du deiner Funktion mitteilst was sie erwarten wird.</p>
<pre><code class="language-cpp">typedef (void)(*fptr)();

BLAFASEL meine_Funktion(fptr ptr) {
  if(ptr)
    ptr();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/875475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875475</guid><dc:creator><![CDATA[hehejo]]></dc:creator><pubDate>Mon, 19 Sep 2005 08:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Mon, 19 Sep 2005 08:51:08 GMT]]></title><description><![CDATA[<p>Funktioniert fast aber beim Programmm ablauf stürzt das Programm nach dem aufruf der CallBack Funktion ab?!</p>
<p>in der Anwendung</p>
<pre><code class="language-cpp">typedef void(CKlasse::*Box)(char *test); 
    typedef UINT  (CALLBACK * DLLFUNKTION)(T_DLL_DATA st_data, Box pFunc);
    DLLFUNKTION DLLfunktion;

    if(m_DownloadDLL != NULL)
    {
        DLLfunktion = (DLLFUNKTION)GetProcAddress                  (m_DLL,&quot;fn_Dllfunktion&quot;);
        if(DLLfunktion != NULL)
        {
            Box pfunc;
            pfunc = CKlasse::BoxString;
            DLLfunktion (data,pfunc);
        }
        FreeLibrary(m_DLL);
    }
</code></pre>
<p>in der DLL</p>
<pre><code class="language-cpp">typedef void(*FunctionReturn)(char *test); 

extern int WINAPI fn_Dllfunktion(T_DLL_DATA st_DllData, FunctionReturn testfunc)
{
    FunctionReturn pFunc; 
    pFunc = testfunc;
    pFunc(&quot;Hallo&quot;);
    pFunc(&quot;Absturz&quot;);
}
</code></pre>
<p>In der Box String wird nur</p>
<pre><code class="language-cpp">AfxMessageBox(string);
</code></pre>
<p>aufgerufen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/875504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875504</guid><dc:creator><![CDATA[Raffzen]]></dc:creator><pubDate>Mon, 19 Sep 2005 08:51:08 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Tue, 20 Sep 2005 04:16:11 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=275" rel="nofollow">Unix-Tom</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC (Visual C++)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</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/876207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/876207</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 20 Sep 2005 04:16:11 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Tue, 20 Sep 2005 08:00:54 GMT]]></title><description><![CDATA[<p>du rufst einen funktionspointer mit einem methodenpointer auf, das kann nicht funktionieren. zeig doch mal mehr code und versuche mal deine designidee besser zu beschreiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/876311</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/876311</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Tue, 20 Sep 2005 08:00:54 GMT</pubDate></item><item><title><![CDATA[Reply to Callback Funktionen on Tue, 20 Sep 2005 08:09:38 GMT]]></title><description><![CDATA[<p>Also es funktioniert soweit alles!!</p>
<p>zur Erklärung!</p>
<p>Die Dll beschreibt einen Ablauf der etwas dauern kann. Deswegen muss sie Status Meldungen verschiedener Statuspunkte zurückliefern.<br />
Das mit der CallBack Funktion funktioniert aber nur wenn ich meine Funktion in der Anwendung mit<br />
static deklariere!</p>
<p>Deswegen MFC weil ich dann keine this-Zeiger mehr verwenden kann sondern mir die Zeiger auf die Daten in der Applikation mit<br />
afxGetapp()-&gt;...<br />
holen muss</p>
<p>Aber Danke für die Hilfe an alle!!!</p>
<p>Gruß Raffzen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/876316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/876316</guid><dc:creator><![CDATA[Raffzen]]></dc:creator><pubDate>Tue, 20 Sep 2005 08:09:38 GMT</pubDate></item></channel></rss>