<?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[Probleme mit GetProcAdress]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hab ein Problem mit Funtionen aus einer DLL.</p>
<p>Aus der DLL will ich 3 Funktionen benutzen, &quot;StartRead&quot;, &quot;StopRead&quot; und &quot;SaveSignature&quot;</p>
<p>Die ersten beiden Funktionen haben keine Parameter, die letzte hat 3 (BSTR, int, bool)</p>
<p>Demzufolge habe ich mir zwei Typdefs gemacht sowie die jeweiligen Pointer:</p>
<pre><code>[cpp]typedef HRESULT (CALLBACK* FUNCTION_POINTER)(void);
typedef HRESULT (CALLBACK* FUNCTION_POINTER_2)(BSTR, int, bool);
FUNCTION_POINTER StartRead;
FUNCTION_POINTER StopRead;
FUNCTION_POINTER_2 SaveSignatureEx;
[/cpp]
</code></pre>
<p>Die DLL lade ich mit: (Diese wird auch erfolgreich geladen.)</p>
<pre><code>[cpp]HINSTANCE paddll = LoadLibrary(&quot;signpad.dll&quot;);[/cpp]
</code></pre>
<p>Danach weise ich den Pointer die mit GetProcAddress zu:</p>
<pre><code>[cpp]
StartRead          =(FUNCTION_POINTER)GetProcAddress(paddll, &quot;StartRead&quot;);
StopRead           =(FUNCTION_POINTER)GetProcAddress(paddll, &quot;StopRead&quot;);
SaveSignatureEx    =(FUNCTION_POINTER_2)GetProcAddress(paddll, &quot;SaveSignatureEx&quot;);    
[/cpp]
</code></pre>
<p>Leider kriege ich keine gültige Adresse aus GetProcAddress zurück..</p>
<p>habe ich irgendwo einen Denkfehler drin?</p>
<p>mfg dave</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/156186/probleme-mit-getprocadress</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Jul 2026 09:41:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/156186.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Aug 2006 12:59:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Mon, 14 Aug 2006 12:59:05 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hab ein Problem mit Funtionen aus einer DLL.</p>
<p>Aus der DLL will ich 3 Funktionen benutzen, &quot;StartRead&quot;, &quot;StopRead&quot; und &quot;SaveSignature&quot;</p>
<p>Die ersten beiden Funktionen haben keine Parameter, die letzte hat 3 (BSTR, int, bool)</p>
<p>Demzufolge habe ich mir zwei Typdefs gemacht sowie die jeweiligen Pointer:</p>
<pre><code>[cpp]typedef HRESULT (CALLBACK* FUNCTION_POINTER)(void);
typedef HRESULT (CALLBACK* FUNCTION_POINTER_2)(BSTR, int, bool);
FUNCTION_POINTER StartRead;
FUNCTION_POINTER StopRead;
FUNCTION_POINTER_2 SaveSignatureEx;
[/cpp]
</code></pre>
<p>Die DLL lade ich mit: (Diese wird auch erfolgreich geladen.)</p>
<pre><code>[cpp]HINSTANCE paddll = LoadLibrary(&quot;signpad.dll&quot;);[/cpp]
</code></pre>
<p>Danach weise ich den Pointer die mit GetProcAddress zu:</p>
<pre><code>[cpp]
StartRead          =(FUNCTION_POINTER)GetProcAddress(paddll, &quot;StartRead&quot;);
StopRead           =(FUNCTION_POINTER)GetProcAddress(paddll, &quot;StopRead&quot;);
SaveSignatureEx    =(FUNCTION_POINTER_2)GetProcAddress(paddll, &quot;SaveSignatureEx&quot;);    
[/cpp]
</code></pre>
<p>Leider kriege ich keine gültige Adresse aus GetProcAddress zurück..</p>
<p>habe ich irgendwo einen Denkfehler drin?</p>
<p>mfg dave</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116943</guid><dc:creator><![CDATA[daveron]]></dc:creator><pubDate>Mon, 14 Aug 2006 12:59:05 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Mon, 14 Aug 2006 13:54:22 GMT]]></title><description><![CDATA[<p>Sind die Funktionen in der DLL auch richtig exportiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116997</guid><dc:creator><![CDATA[Pellaeon]]></dc:creator><pubDate>Mon, 14 Aug 2006 13:54:22 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Mon, 14 Aug 2006 17:04:54 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=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">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/1117148</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117148</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 14 Aug 2006 17:04:54 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Mon, 14 Aug 2006 19:11:34 GMT]]></title><description><![CDATA[<p>Könnt an der verwendeten Namensdekoration liegen. Schau' dir 'mal die DLL mit</p>
<pre><code>dumpbin /EXPORTS die.dll
</code></pre>
<p>an. Verwende zum Importieren der Funktionen die Namen genau so, wie sie dort angezeigt werden.</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1117225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117225</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 14 Aug 2006 19:11:34 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Tue, 15 Aug 2006 13:05:43 GMT]]></title><description><![CDATA[<p>Da C++ ja Funktions-Überladung unterstützt, generiert der Compiler für jede Version einen eigenen (fast unleserlichen) Funktionsnamen.<br />
Wenn man die funktion als extern &quot;C&quot; erstellt, übernimmt der Compiler den richtigen Funktionsnamen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1117584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117584</guid><dc:creator><![CDATA[qasdfgh]]></dc:creator><pubDate>Tue, 15 Aug 2006 13:05:43 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Tue, 15 Aug 2006 14:04:24 GMT]]></title><description><![CDATA[<p>qasdfgh schrieb:</p>
<blockquote>
<p>Wenn man die funktion als extern &quot;C&quot; erstellt, übernimmt der Compiler den richtigen Funktionsnamen.</p>
</blockquote>
<p>...was ich nur empfehlen kann, denn:</p>
<p>Swordfish schrieb:</p>
<blockquote>
<p>Verwende zum Importieren der Funktionen die Namen genau so, wie sie dort angezeigt werden.</p>
</blockquote>
<p>Da die C++-dekorierten Funktionsnamen compilerabhängig generiert werden, besteht dann aber die Gefahr, dass das Programm, dass die Dll dynamisch linkt, mit einer neue Version der Dll nicht mehr funktioniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1117640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117640</guid><dc:creator><![CDATA[Cosmixx]]></dc:creator><pubDate>Tue, 15 Aug 2006 14:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Tue, 15 Aug 2006 15:05:24 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Cosmixx schrieb:</p>
<blockquote>
<p>qasdfgh schrieb:</p>
<blockquote>
<p>Wenn man die funktion als extern &quot;C&quot; erstellt, übernimmt der Compiler den richtigen Funktionsnamen.</p>
</blockquote>
<p>...was ich nur empfehlen kann, denn:</p>
<p>Swordfish schrieb:</p>
<blockquote>
<p>Verwende zum Importieren der Funktionen die Namen genau so, wie sie dort angezeigt werden.</p>
</blockquote>
<p>Da die C++-dekorierten Funktionsnamen compilerabhängig generiert werden, besteht dann aber die Gefahr, dass das Programm, dass die Dll dynamisch linkt, mit einer neue Version der Dll nicht mehr funktioniert.</p>
</blockquote>
<p>Du Vollidiot...:</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_down"
      title=":-1:"
      alt="👎"
    /> OMG was für ein überflüssiger Post! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_down"
      title=":-1:"
      alt="👎"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1117667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117667</guid><dc:creator><![CDATA[Spackken]]></dc:creator><pubDate>Tue, 15 Aug 2006 15:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit GetProcAdress on Tue, 15 Aug 2006 15:20:12 GMT]]></title><description><![CDATA[<p>@Spackken:<br />
Du solltest zunächst aufmerksam lesen, <strong>dann</strong> überlegen und <strong>dann</strong> schreiben, denn, das was ich geschrieben habe, kann durchaus passieren, wenn man die dekorierten Funktionsnamen mit GetProcAddress benutzt. Es war als Ergänzung zu Swordfish's Beitrag gedacht, aber Du hast Dir ja selbst schon einen passenden Nutzernamen gegeben. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1117675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1117675</guid><dc:creator><![CDATA[Cosmixx]]></dc:creator><pubDate>Tue, 15 Aug 2006 15:20:12 GMT</pubDate></item></channel></rss>