<?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[Problem mit GetProcAddress]]></title><description><![CDATA[<p>Hi ich wollte jetzt aus meiner DLL eine Funktion laden:</p>
<pre><code class="language-cpp">if( (hDll = LoadLibrary(TEXT(&quot;dict.leo.dll&quot;))) != NULL)
            {
                OnInfo.GetTmpList = (fpGetTmpList) GetProcAddress(hDll, &quot;GetTmpList&quot;);
                if(OnInfo.GetTmpList == NULL)
                    ErrorPrintSave(GetLastError(), hwnd, 2, TRUE);

                else
                {
                    LoadStringA(hDll, IDS_HOST, OnInfo.szHost, MAX_HOST_LEN - 1);
                    MessageBox(hwnd, OnInfo.szHost, TEXT(&quot;test:&quot;), MB_OK);
                }

            }
            else
                MessageBox(hwnd, TEXT(&quot;Could not load DLL&quot;), TEXT(&quot;Error:&quot;), MB_OK);
</code></pre>
<p>Leider kommt jetzt immer der Fehler:</p>
<blockquote>
<p>The specified procedure could not be found</p>
</blockquote>
<p>Hier noch Header von dict.leo.dll:</p>
<pre><code class="language-cpp">#ifndef __DICT_LEO__
#define __DICT_LEO__

#include &quot;typesDefs.h&quot;

#ifdef __cplusplus
#define EXPORT extern &quot;C&quot; __declspec (dllexport)
#else
#define EXPORT __declspec (dllexport)
#endif
[Restliche Funktionen aus Platzgründen weggelassen]
EXPORT TMPLIST* CALLBACK GetTmpList(TCHAR *szFile, int *iError);

#endif
</code></pre>
<p>Warum kommt jetzt dieser Fehler?</p>
<p>MFG PinguGroup</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/208331/problem-mit-getprocaddress</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 06:32:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/208331.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Mar 2008 14:30:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 14:30:46 GMT]]></title><description><![CDATA[<p>Hi ich wollte jetzt aus meiner DLL eine Funktion laden:</p>
<pre><code class="language-cpp">if( (hDll = LoadLibrary(TEXT(&quot;dict.leo.dll&quot;))) != NULL)
            {
                OnInfo.GetTmpList = (fpGetTmpList) GetProcAddress(hDll, &quot;GetTmpList&quot;);
                if(OnInfo.GetTmpList == NULL)
                    ErrorPrintSave(GetLastError(), hwnd, 2, TRUE);

                else
                {
                    LoadStringA(hDll, IDS_HOST, OnInfo.szHost, MAX_HOST_LEN - 1);
                    MessageBox(hwnd, OnInfo.szHost, TEXT(&quot;test:&quot;), MB_OK);
                }

            }
            else
                MessageBox(hwnd, TEXT(&quot;Could not load DLL&quot;), TEXT(&quot;Error:&quot;), MB_OK);
</code></pre>
<p>Leider kommt jetzt immer der Fehler:</p>
<blockquote>
<p>The specified procedure could not be found</p>
</blockquote>
<p>Hier noch Header von dict.leo.dll:</p>
<pre><code class="language-cpp">#ifndef __DICT_LEO__
#define __DICT_LEO__

#include &quot;typesDefs.h&quot;

#ifdef __cplusplus
#define EXPORT extern &quot;C&quot; __declspec (dllexport)
#else
#define EXPORT __declspec (dllexport)
#endif
[Restliche Funktionen aus Platzgründen weggelassen]
EXPORT TMPLIST* CALLBACK GetTmpList(TCHAR *szFile, int *iError);

#endif
</code></pre>
<p>Warum kommt jetzt dieser Fehler?</p>
<p>MFG PinguGroup</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1475903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475903</guid><dc:creator><![CDATA[PinguGroup]]></dc:creator><pubDate>Mon, 17 Mar 2008 14:30:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 14:35:35 GMT]]></title><description><![CDATA[<p>Weil die Funktion nicht mit dem Namen GetTmpList exportiert wird wenn du die __stdcall (CALLBACK) Aufrufkonvention benutzt. Google mal nach Def-Datei, damit kann man die Namen dann richtig exportieren. Außerdem solltest du dir mal Dependency Walker anschauen, der zeigt die Funktionsnamen einer DLL an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1475909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475909</guid><dc:creator><![CDATA[~~~~~~]]></dc:creator><pubDate>Mon, 17 Mar 2008 14:35:35 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 14:51:06 GMT]]></title><description><![CDATA[<p>Danke für die schnelle Antwort.</p>
<p>Hab mir jetzt mal: Dependency Walker herunter geladen und da stand das meine Funktioen: &quot;GetTmpList@8&quot; heisst.</p>
<p>Ok jetzt hab ich das mal als Name eingesetzt und es funktionert einwandfrei.<br />
Theoretisch gesagt könnte ich das ja jetzt so lassen und muss nichts mehr mit den def file rum tun oder?</p>
<p>BTW: das &quot;@8&quot; bedeutet doch das die Parameterliste 8Byte umfasst oder?</p>
<p>MFG PinguGroup</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1475926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475926</guid><dc:creator><![CDATA[PinguGroup]]></dc:creator><pubDate>Mon, 17 Mar 2008 14:51:06 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 15:23:15 GMT]]></title><description><![CDATA[<p>Es bedeuteted einfach, dass der Namen der exportierten Funktion mangled ist (dekoriert).<br />
Und das wiederum heisst, dass es sicher nicht extern &quot;C&quot; exportiert ist.</p>
<p>Benutze für den export von Funktionen im C- Style format entweder __declspec(dllexport) mit extern &quot;C&quot; ODER ein *def File.</p>
<p>Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1475951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475951</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Mon, 17 Mar 2008 15:23:15 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 15:39:00 GMT]]></title><description><![CDATA[<p>Simon es liegt an der Aufrufkonvention!</p>
<pre><code class="language-cpp">extern &quot;C&quot; __declspec(dllexport) int Addiere1(int a, int b)
{
	return a + b;
}

extern &quot;C&quot; __declspec(dllexport) int __stdcall Addiere2(int a, int b)
{
	return a + b;
}
</code></pre>
<p>Addiere1 wird nicht dekoriert, Addiere2 wird dekoriert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1475969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475969</guid><dc:creator><![CDATA[extern]]></dc:creator><pubDate>Mon, 17 Mar 2008 15:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit GetProcAddress on Mon, 17 Mar 2008 16:13:54 GMT]]></title><description><![CDATA[<p>ok, danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1476004</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1476004</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Mon, 17 Mar 2008 16:13:54 GMT</pubDate></item></channel></rss>