<?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[Typedef und __thiscall]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin grad etwas verwirrt, eventuell weil ich auch schon etwas zu lang wach bin, deswegen frag ich hier mal um Rat.</p>
<p>Ich muss meine Funktion implizit mit __thiscall aufrufen, dazu hab ich mir folgendes typedef erstellt:</p>
<pre><code class="language-cpp">struct CMyClass {
   int __thiscall tMyFunction(char * str, int len);   
};

typedef int (CMyClass::  * tMyFunction)(char *, int);
</code></pre>
<p>Und nun das Problem, ich krieg meine Funktion irgendwie nicht zusammengebastelt:<br />
Ich muss meinem Programm sagen wo im Speicher sich tMyFunction befindet.</p>
<p>Hier: hab ich keine Ahnung wie ich callMyFunction initialisieren muss, ich hab schon alles rum gestellt, aber es gibt immer Fehler beim kompilieren.</p>
<pre><code class="language-cpp">//0x064332 Addressoffset von MyFunction im Speicher
CMyClass::  * tMyFunction callMyFunction = (CMyClass::  * MyFunction)0x064332;
</code></pre>
<p>Wäre super wenn jemand Rat weis.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/242278/typedef-und-__thiscall</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 03:45:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/242278.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Jun 2009 03:16:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Typedef und __thiscall on Tue, 02 Jun 2009 03:16:53 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin grad etwas verwirrt, eventuell weil ich auch schon etwas zu lang wach bin, deswegen frag ich hier mal um Rat.</p>
<p>Ich muss meine Funktion implizit mit __thiscall aufrufen, dazu hab ich mir folgendes typedef erstellt:</p>
<pre><code class="language-cpp">struct CMyClass {
   int __thiscall tMyFunction(char * str, int len);   
};

typedef int (CMyClass::  * tMyFunction)(char *, int);
</code></pre>
<p>Und nun das Problem, ich krieg meine Funktion irgendwie nicht zusammengebastelt:<br />
Ich muss meinem Programm sagen wo im Speicher sich tMyFunction befindet.</p>
<p>Hier: hab ich keine Ahnung wie ich callMyFunction initialisieren muss, ich hab schon alles rum gestellt, aber es gibt immer Fehler beim kompilieren.</p>
<pre><code class="language-cpp">//0x064332 Addressoffset von MyFunction im Speicher
CMyClass::  * tMyFunction callMyFunction = (CMyClass::  * MyFunction)0x064332;
</code></pre>
<p>Wäre super wenn jemand Rat weis.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719361</guid><dc:creator><![CDATA[jockels]]></dc:creator><pubDate>Tue, 02 Jun 2009 03:16:53 GMT</pubDate></item><item><title><![CDATA[Reply to Typedef und __thiscall on Tue, 02 Jun 2009 09:25:51 GMT]]></title><description><![CDATA[<p>C++ erlaubt keine Konvertierung zwischen Daten- und (Member-)Funktionszeigern.</p>
<p>Aber irgendwie wirst du wohl zur Adresse 0x064332 kommen. Ist die immer gleich? Wieso hast du überhaupt eine Adresse vorliegen? Notfalls kannst du einen Workaround mit <code>union</code> versuchen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719475</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Tue, 02 Jun 2009 09:25:51 GMT</pubDate></item><item><title><![CDATA[Reply to Typedef und __thiscall on Tue, 02 Jun 2009 10:17:27 GMT]]></title><description><![CDATA[<p>Oder mit <a href="http://www.boost.org/doc/libs/1_39_0/doc/html/function.html" rel="nofollow">boost::function</a> probieren.</p>
<p>Gut Schuß<br />
VuuRWerK <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1719503</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719503</guid><dc:creator><![CDATA[VuuRWerK]]></dc:creator><pubDate>Tue, 02 Jun 2009 10:17:27 GMT</pubDate></item></channel></rss>