<?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: Client Funktion aufrufen]]></title><description><![CDATA[<p>Hi!<br />
Ich habe in einer DLL einen simplen Message Handler. Wenn dieser die Funktion in der DLL aufruft, soll in dieser Funktion eine Client Funktion aufgerufen werden:<br />
DLL<br />
Meessage<br />
|-&gt; CMyDLLMessage()<br />
{<br />
MyClient()-&gt;CallClientFunction();<br />
}</p>
<p>Aber wie bekomme ich ein Handle auf den Client?</p>
<p>Danke im Voraus!!<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/64897/dll-client-funktion-aufrufen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 03:49:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/64897.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Feb 2004 15:58:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sat, 14 Feb 2004 15:58:21 GMT]]></title><description><![CDATA[<p>Hi!<br />
Ich habe in einer DLL einen simplen Message Handler. Wenn dieser die Funktion in der DLL aufruft, soll in dieser Funktion eine Client Funktion aufgerufen werden:<br />
DLL<br />
Meessage<br />
|-&gt; CMyDLLMessage()<br />
{<br />
MyClient()-&gt;CallClientFunction();<br />
}</p>
<p>Aber wie bekomme ich ein Handle auf den Client?</p>
<p>Danke im Voraus!!<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459344</guid><dc:creator><![CDATA[michael2]]></dc:creator><pubDate>Sat, 14 Feb 2004 15:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sat, 14 Feb 2004 16:01:57 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>du musst dazu die Client-Funktion genau wie die dll Funktionen mit __declspec(dllexport) deklarieren.</p>
<p>Dann kommst du in der Dll über</p>
<pre><code class="language-cpp">GetProcAddress(NULL, &quot;Funktion&quot;)
</code></pre>
<p>an den Zeiger auf die Funktion.</p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459346</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Sat, 14 Feb 2004 16:01:57 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sat, 14 Feb 2004 17:17:47 GMT]]></title><description><![CDATA[<p>Cool Dnake. Genau das was ich gesucht habe! Funktioniert Perfekt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459414</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459414</guid><dc:creator><![CDATA[michael2]]></dc:creator><pubDate>Sat, 14 Feb 2004 17:17:47 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sun, 15 Feb 2004 11:32:41 GMT]]></title><description><![CDATA[<p>Moin<br />
Ich habe das gleiche jetzt nochmal gebraucht und zwar mit einem Parameter in der Funtktion - aufeinmal gings nicht mehr <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>DLL:</p>
<pre><code>__declspec(dllimport) void __cdecl Callback (unsigned); 
typedef void (CALLBACK *Callback) (unsigned); 
//....
FARPROC myFunc = (Callback)GetProcAddress(NULL, &quot;Callback&quot;);
myFunc((unsigned)m_cList.GetItemData(iItem));
</code></pre>
<p>Client:</p>
<pre><code>//h
extern &quot;C&quot; __declspec(dllexport) void Callback(unsigned id);
//cpp
void Callback(unsigned id)
{}
</code></pre>
<p>Ich probierte auch folgende Methode:<br />
Client</p>
<pre><code>//h
extern &quot;C&quot; __declspec(dllimport) void Callback(unsigned id);
//cpp
FARPROC myFunc = (FARPROC)GetProcAddress(NULL, &quot;Callback&quot;);
myFunc((unsigned)m_cList.GetItemData(iItem));
</code></pre>
<p>Mein Kompilier Error:</p>
<blockquote>
<p>error C2197: 'int (__stdcall *)(void)' : Zu viele Parameter uebergeben</p>
</blockquote>
<p>Was mach ich da falsch??<br />
Danke im Voraus!!<br />
mfg michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459710</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459710</guid><dc:creator><![CDATA[michael2]]></dc:creator><pubDate>Sun, 15 Feb 2004 11:32:41 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sun, 15 Feb 2004 11:47:41 GMT]]></title><description><![CDATA[<p>Hi!<br />
Ich habe ein gutes Bso. gefunden:<br />
<a href="http://www.henkessoft.de/api6.htm" rel="nofollow">http://www.henkessoft.de/api6.htm</a></p>
<pre><code>typedef BOOL (WINAPI *PFN_ELLIPSE) (HDC, int, int, int, int);
PFN_ELLIPSE pfn_Ellipse = (PFN_ELLIPSE) GetProcAddress(hLib, &quot;Ellipse&quot;);
</code></pre>
<p>Aber ich verstehe da nicht, woher PFN_ELLIPSE kommt? Weiß das jemand zufällig?</p>
<p>Danke!!! mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459724</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459724</guid><dc:creator><![CDATA[michael2]]></dc:creator><pubDate>Sun, 15 Feb 2004 11:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: Client Funktion aufrufen on Sun, 15 Feb 2004 13:05:11 GMT]]></title><description><![CDATA[<p>Bin ich dumm <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
Die Lösung war die ganze Zeit vor mir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<pre><code>typedef void (CLBFUNC)(unsigned);
CLBFUNC* pFunction;
VERIFY(pFunction = (CLBFUNC*)::GetProcAddress(NULL,&quot;Callback&quot;));
(*pFunction)(10);
</code></pre>
<p>Thx,<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/459778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/459778</guid><dc:creator><![CDATA[michael2]]></dc:creator><pubDate>Sun, 15 Feb 2004 13:05:11 GMT</pubDate></item></channel></rss>