<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Visual C++ Tips &#187; VC++ Debugging Tips</title>
	<atom:link href="http://weseetips.com/category/vc-debugging-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to Watch this Pointer &#8211; The Wizards Way!</title>
		<link>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/</link>
		<comments>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 15:39:15 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[VC++ Debugging Tips]]></category>
		<category><![CDATA[Visual C++]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[ECX]]></category>
		<category><![CDATA[this]]></category>
		<category><![CDATA[this pointer]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[watch window]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=1171</guid>
		<description><![CDATA[How to watch the this pointer? Just add &#8216;this&#8217; to watch window. Everyone does like that. Isn&#8217;t it? But how Visual C++ wizards watch &#8216;this&#8217; pointer? The secret is, visual C++ compiler passes this pointer via ECX register. So add (ClassName*)(@ECX) to watch window will give you this pointer. Have a look at the screenshot. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
How to watch the this pointer? Just add <span style="color:#0000ff;">&#8216;this&#8217;</span> to watch window. Everyone does like that. Isn&#8217;t it? But how <span style="color:#0000ff;">Visual C++ wizards</span> watch <span style="color:#0000ff;">&#8216;this&#8217;</span> pointer? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-1172" title="thiswizardway" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/07/thiswizardway.jpg" alt="thiswizardway" width="442" height="350" /></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
The secret is, visual C++ compiler passes <span style="color:#0000ff;"><em><strong>this </strong></em></span>pointer via <span style="color:#0000ff;"><em>ECX</em> </span>register. So add <span style="color:#0000ff;"><strong>(ClassName*)(@ECX)</strong></span> to watch window will give you this pointer. Have a look at the screenshot.</p>
<p><img class="alignnone size-full wp-image-1173" title="thiswizardway2" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/07/thiswizardway2.jpg" alt="thiswizardway2" width="510" height="382" /></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Interesting, the internals of Visual C++. Isn&#8217;t it?</p>
<p><img class="alignnone size-medium wp-image-53" title="intermediateseries" src="http://weseetips.files.wordpress.com/2008/03/intermediateseries.jpg?w=248" alt="" width="248" height="32" /><br />
Targeted Audiance &#8211; Intermediate.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

