<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/hacking-c-from-c.html comments</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Sun, 10 May 2026 04:34:34 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>mikeash - 2009-11-06 17:21:51</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>Well, it took me an absurdly long time, but the site now uses a floating div for the menu instead of table-based layout. This means that wide code in pre blocks will no longer cause the entire page to be widened, as would happen previously.
&lt;br /&gt;
&lt;br /&gt;Thanks for giving me the impetus to get this fixed, guys.</description><guid isPermaLink="true">159cb770e866f35bb2d3c8d617b26e40</guid><pubDate>Fri, 06 Nov 2009 17:21:51 GMT</pubDate></item><item><title>Ron - 2009-11-04 09:15:11</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>any reason this page is formatted strangely?  I have to scroll to the right to read it all in Opera 10.</description><guid isPermaLink="true">699569a4a10fbb9be9abc0817ba592af</guid><pubDate>Wed, 04 Nov 2009 09:15:11 GMT</pubDate></item><item><title>mikeash - 2009-11-04 02:50:16</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>Is passing &lt;code&gt;this&lt;/code&gt; in ECX a feature of Visual Studio only, or is it part of the Windows ABI in general? Or to put it another way, are VS-generated C++ object files compatible with, say, gcc-generated ones on Windows?</description><guid isPermaLink="true">e0b353d1b98c08de111f3208aa2569a4</guid><pubDate>Wed, 04 Nov 2009 02:50:16 GMT</pubDate></item><item><title>Ramsey Stone - 2009-11-04 02:21:37</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>This behavior is highly compiler specific. For instance, in Visual Studio compiled binaries, the this pointer is passed to member functions in the ECX register, not on the stack. You can emulate this doing something like:
&lt;br /&gt;
&lt;br /&gt;void __fastcall Class__member(void *this, void *unused, int arg1, int arg2, int arg3);
&lt;br /&gt;
&lt;br /&gt;__fastcall is a calling convention where the first two arguments are passed in through the ECX and EDX registers. This becomes incredibly useful when hooking C++ member functions.</description><guid isPermaLink="true">3db4bb865385e4d0ba70862c230f3f95</guid><pubDate>Wed, 04 Nov 2009 02:21:37 GMT</pubDate></item><item><title>Richard Marston - 2009-11-03 22:13:24</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>If you wish to demangle c++ symbol names, the command c++filt is useful: 
&lt;br /&gt;rich@rich-laptop:~$ c++filt
&lt;br /&gt;_ZN5khtml12RenderObject9setPixmapERK7QPixmapRK5QRectPNS_11CachedImageE
&lt;br /&gt;khtml::RenderObject::setPixmap(QPixmap const&amp;amp;, QRect const&amp;amp;, khtml::CachedImage*)
&lt;br /&gt;</description><guid isPermaLink="true">e8345474cd307dba72dfff1e793223fb</guid><pubDate>Tue, 03 Nov 2009 22:13:24 GMT</pubDate></item><item><title>mikeash - 2006-11-19 02:35:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>I have no idea if it&amp;amp;#8217;s illegal in C++, but this is all pure C code so that is not a concern. As to whether it&amp;amp;#8217;s legal in standard C, I couldn&amp;amp;#8217;t tell you for sure, but I know that gcc accepts this code and that&amp;amp;#8217;s good enough for me. This kind of hackery is never going to be portable so there&amp;amp;#8217;s little point in making it work on obscure compilers the code will never encounter anyway.
&lt;br /&gt;</description><guid isPermaLink="true">a935005fd900b005f2012eb8e83fe999</guid><pubDate>Sun, 19 Nov 2006 02:35:00 GMT</pubDate></item><item><title>Morpheus - 2006-11-17 20:29:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>i thought it was illegal in c++ to use typedef in a function definition
&lt;br /&gt;</description><guid isPermaLink="true">9e78ab1203f41cfea0bb0810914aa3ee</guid><pubDate>Fri, 17 Nov 2006 20:29:00 GMT</pubDate></item><item><title>Chris - 2006-08-04 20:13:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>Ah, ok. Well, as I said before, great work anyways!!! It was fun to read and very interesting!
&lt;br /&gt;</description><guid isPermaLink="true">0e1b47d8500a4574b031c35f2b85aa94</guid><pubDate>Fri, 04 Aug 2006 20:13:00 GMT</pubDate></item><item><title>mikeash - 2006-08-04 17:54:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>Chris,&amp;lt;br /&amp;gt;
&lt;br /&gt;&amp;lt;br /&amp;gt;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Because WebKit source code is fairly new. At the time I wrote this, WebKit (not to be confused with WebCore) was not open source. WebCore was, but I couldn&amp;amp;#8217;t use it directly since it was only designed to be used from WebKit.
&lt;br /&gt;</description><guid isPermaLink="true">4e0c0e48b9b417f1fe90713fa4b0bfeb</guid><pubDate>Fri, 04 Aug 2006 17:54:00 GMT</pubDate></item><item><title>Chris - 2006-08-04 10:00:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>Hey, great article!&amp;lt;br /&amp;gt;
&lt;br /&gt;Perhaps I&amp;amp;#8217;m not getting the point, but I&amp;amp;#8217;m wondering why you don&amp;amp;#8217;t just use the public available WebKit source code.
&lt;br /&gt;</description><guid isPermaLink="true">ca16f1cf806e3a9c3533153dab76c810</guid><pubDate>Fri, 04 Aug 2006 10:00:00 GMT</pubDate></item><item><title>Rosyna - 2006-08-03 21:46:00</title><link>http://www.mikeash.com/?page=pyblog/hacking-c-from-c.html#comments</link><description>There is a special place in hell reserved for people like you.
&lt;br /&gt;</description><guid isPermaLink="true">d8aec77962bebdbb30607eb61b7dea04</guid><pubDate>Thu, 03 Aug 2006 21:46:00 GMT</pubDate></item></channel></rss>
