<?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[GetProcAdress - Funktion aus DLL laden]]></title><description><![CDATA[<p>hallo!</p>
<p>ich möchte eine Funktion -</p>
<pre><code class="language-cpp">extern &quot;C&quot; { 
_declspec(dllexport) HelloWorld(char* text) 
{ 
//... 
} 
}
</code></pre>
<p>- aus einer DLL laden.<br />
also:</p>
<pre><code class="language-cpp">HINSTANCE hhelp; 
hhelp= LoadLibrary(&quot;insert.dll&quot;); 
GetProcAddress(...,...);
</code></pre>
<p>Die DLL wird erfolgreich geladen, nur wie gelange ich zur Funktion?<br />
und welche PARAMETER erhält GetProcAddress?<br />
hat jemand ein Beispiel?</p>
<p>mfG (c)h</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/96872/getprocadress-funktion-aus-dll-laden</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 06:45:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/96872.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Jan 2005 17:05:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 17:05:42 GMT]]></title><description><![CDATA[<p>hallo!</p>
<p>ich möchte eine Funktion -</p>
<pre><code class="language-cpp">extern &quot;C&quot; { 
_declspec(dllexport) HelloWorld(char* text) 
{ 
//... 
} 
}
</code></pre>
<p>- aus einer DLL laden.<br />
also:</p>
<pre><code class="language-cpp">HINSTANCE hhelp; 
hhelp= LoadLibrary(&quot;insert.dll&quot;); 
GetProcAddress(...,...);
</code></pre>
<p>Die DLL wird erfolgreich geladen, nur wie gelange ich zur Funktion?<br />
und welche PARAMETER erhält GetProcAddress?<br />
hat jemand ein Beispiel?</p>
<p>mfG (c)h</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687807</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687807</guid><dc:creator><![CDATA[chille07]]></dc:creator><pubDate>Wed, 05 Jan 2005 17:05:42 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 17:52:14 GMT]]></title><description><![CDATA[<p>Kannst du nicht Google oder die Forensuche benutzen um Beispeile zu GetProcAddress zu finden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687866</guid><dc:creator><![CDATA[hmmmmmm?]]></dc:creator><pubDate>Wed, 05 Jan 2005 17:52:14 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 18:15:22 GMT]]></title><description><![CDATA[<p>na gut.. dann nehmen wir mal einen Beispielcode:</p>
<pre><code class="language-cpp">#include&lt;windows.h&gt;
void main()
{
    HMODULE myLib = NULL; 
    DLLPrcInst SetHook = NULL; 

    myLib = LoadLibrary (&quot;insert.dll&quot;); 

    if (myLib == NULL) 
        MessageBox (NULL, &quot;Fehler beim Laden der DLL&quot;, &quot;Error&quot;, MB_OK); 

    SetHook = (DLLPrcInst)GetProcAddress (myLib, &quot;HelloWorld&quot;); 

    if (SetHook == NULL)
        MessageBox (NULL, &quot;Fehler beim Laden der Funktionen&quot;, &quot;Error&quot;, MB_OK); 
    FreeLibrary (myLib); 
}
</code></pre>
<p>(tolles beispiel <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="😉"
    /> funktioniert nicht mal):<br />
&quot;DLLPrcInst&quot; kennt mein compiler nicht<br />
folglich kann ich DAS nicht mal testen.</p>
<p>DANN NOCH: woher weiss man, wie die funktion also &quot;HelloWorld&quot; heisst, weil ich glaube, DAS ist es nicht ganz<br />
mfG (c)h</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687881</guid><dc:creator><![CDATA[chille07]]></dc:creator><pubDate>Wed, 05 Jan 2005 18:15:22 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 18:20:17 GMT]]></title><description><![CDATA[<p>Dann such ein vernünftiges Beispiel das komplett ist.</p>
<p>Bei deiner eigenen DLL solltest du schon die Namen wissen, oder falls es eine Fremd-DLL ist muss es irgendwo dokumentiert sein. Den Namen kann man auch über das Tool &quot;Dependency Walker&quot; rausfinden, aber nicht die Parameter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687888</guid><dc:creator><![CDATA[hmmmmmm?]]></dc:creator><pubDate>Wed, 05 Jan 2005 18:20:17 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 18:25:59 GMT]]></title><description><![CDATA[<p>woher bekomme ich das Tool?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687896</guid><dc:creator><![CDATA[chille07]]></dc:creator><pubDate>Wed, 05 Jan 2005 18:25:59 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 18:27:06 GMT]]></title><description><![CDATA[<p>Oh man du bist echt zu doof.</p>
<p>Google benutzen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687901</guid><dc:creator><![CDATA[hmmmmm??]]></dc:creator><pubDate>Wed, 05 Jan 2005 18:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 18:28:14 GMT]]></title><description><![CDATA[<p>*dachte nicht, dass das programm so bekannt ist, oder das es so eindeutig zu identifizieren sein wird*<br />
aber: mal googlen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/687902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/687902</guid><dc:creator><![CDATA[chille07]]></dc:creator><pubDate>Wed, 05 Jan 2005 18:28:14 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 22:34:43 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;stdio.h&gt; 
#include &lt;windows.h&gt; 

typedef void/*rückgabewert*/ (_cdecl* FUNC)(/*parameter*/); 

void loadDLL()
{     
	HINSTANCE hDLL = LoadLibrary(&quot;dllname.dll&quot;);     

	if(hDLL != NULL)
	{ 
		printf(&quot;DLL geladen.&quot;); 
		FUNC function1 = (FUNC)GetProcAddress(hDLL, &quot;funktionsname&quot;); 
		function1();
		FreeLibrary(hDLL); 
	}
	else
	{ 
		printf(&quot;DLL nicht geladen.&quot;); 
	} 
} 

void main() { 
    loadDLL(); 
}
</code></pre>
<p>Damit mal irgendwo ein (bei mir) funktionierender code steht. (man findet ja sonst nur fehlerhafte codes)</p>
<p>PS.: es funktioniert, aber wenn ich was besser machen kann, oder falsch verstanden habe: bitte melden <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="😉"
    /></p>
<p>mfG (c)h</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688202</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688202</guid><dc:creator><![CDATA[chille07]]></dc:creator><pubDate>Wed, 05 Jan 2005 22:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to GetProcAdress - Funktion aus DLL laden on Wed, 05 Jan 2005 22:50:43 GMT]]></title><description><![CDATA[<p>Den Rückgabewert von GetProcAddress auf NULL prüfen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688207</guid><dc:creator><![CDATA[verbesserungsvorschlag]]></dc:creator><pubDate>Wed, 05 Jan 2005 22:50:43 GMT</pubDate></item></channel></rss>