<?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>bits and bytes</title>
	<atom:link href="http://ntcoder.com/bab/feed/" rel="self" type="application/rss+xml" />
	<link>http://ntcoder.com/bab</link>
	<description>C, C++, VC++, C#, VB.net, Debugging, Dump analysis, Windbg, and Visual Studio related stuff</description>
	<lastBuildDate>Tue, 10 Apr 2012 00:20:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>windbg: kf command</title>
		<link>http://ntcoder.com/bab/2012/04/10/windbg-kf-command/</link>
		<comments>http://ntcoder.com/bab/2012/04/10/windbg-kf-command/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 00:20:26 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[CDB]]></category>
		<category><![CDATA[kf]]></category>
		<category><![CDATA[ntsd]]></category>
		<category><![CDATA[windbg]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2407</guid>
		<description><![CDATA[kf is a useful command to find out stack memory taken by a frame. See below… I have three functions which looks like this… #pragma auto_inline(off) void TestStack2() { &#160;&#160;&#160;&#160;&#160;&#160; printf(&#34;hello&#34;); &#160;&#160;&#160;&#160;&#160;&#160; return; } void TestStack1() { &#160;&#160;&#160;&#160;&#160;&#160; TestStack2(); &#160;&#160;&#160;&#160;&#160;&#160; char bytes[0x190] = {9}; &#160;&#160;&#160;&#160;&#160;&#160; printf(&#34;hello: %s&#34;, bytes); } void TestStack() { &#160;&#160;&#160;&#160;&#160;&#160; TestStack1(); &#160;&#160;&#160;&#160;&#160;&#160; <a href='http://ntcoder.com/bab/2012/04/10/windbg-kf-command/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>kf is a useful command to find out stack memory taken by a frame. See below…   <br />I have three functions which looks like this…</p>
<p><font face="Courier New">#pragma auto_inline(off)     <br />void TestStack2()      <br />{      <br />&#160;&#160;&#160;&#160;&#160;&#160; printf(&quot;hello&quot;);      <br />&#160;&#160;&#160;&#160;&#160;&#160; return;      <br />}      <br />void TestStack1()      <br />{      <br />&#160;&#160;&#160;&#160;&#160;&#160; TestStack2();      <br />&#160;&#160;&#160;&#160;&#160;&#160; char bytes[<font style="background-color: #ffff00">0x190</font>] = {9};      <br />&#160;&#160;&#160;&#160;&#160;&#160; printf(&quot;hello: %s&quot;, bytes);      <br />}      <br />void TestStack()      <br />{      <br />&#160;&#160;&#160;&#160;&#160;&#160; TestStack1();      <br />&#160;&#160;&#160;&#160;&#160;&#160; char bytes[<font style="background-color: #ffff00">0x90</font>] = {9};      <br />&#160;&#160;&#160;&#160;&#160;&#160; printf(&quot;hello: %s&quot;, bytes);      <br />}</font></p>
<p><font face="Courier New">// Check out the frame sizes…</font>    <br /><font face="Courier New"><font size="2">&#160; </font>Memory</font>&#160; <font size="2" face="Courier New">ChildEBP RetAddr&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0024f000 00291578 TestMFC1!TestStack2+0&#215;5       <br />&#160;&#160;&#160;&#160;&#160; <font style="background-color: #ffff00">19c</font> 0024f19c 002915d8 TestMFC1!TestStack1+0&#215;18      <br />&#160;&#160;&#160;&#160;&#160;&#160; <font style="background-color: #ffff00">9c</font> 0024f238 002916ea TestMFC1!TestStack+0&#215;18       <br />&#160;&#160;&#160;&#160;&#160;&#160; 28 0024f260 7856f282 TestMFC1!CTestMFC1Dlg::OnInitDialog+0xca       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; 8 0024f268 752c62fa mfc100!AfxDlgProc+0&#215;31       <br />&#160;&#160;&#160;&#160;&#160;&#160; 2c 0024f294 752ef9df USER32!InternalCallWinProc+0&#215;23       <br />&#160;&#160;&#160;&#160;&#160;&#160; 7c 0024f310 752ef784 USER32!UserCallDlgProcCheckWow+0xd7       <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;snip…&gt;</font></p>
<p>Alternatively we can take difference of child ebp and current esp to know frame size.   </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F04%2F10%2Fwindbg-kf-command%2F&amp;title=windbg%3A%20kf%20command" id="wpa2a_2"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/04/10/windbg-kf-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to force symbol loading in WinDbg</title>
		<link>http://ntcoder.com/bab/2012/03/06/how-to-force-symbol-loading-in-windbg/</link>
		<comments>http://ntcoder.com/bab/2012/03/06/how-to-force-symbol-loading-in-windbg/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 23:33:46 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[pdb]]></category>
		<category><![CDATA[Symbols]]></category>
		<category><![CDATA[symopt]]></category>
		<category><![CDATA[SYMOPT_LOAD_ANYTHING]]></category>
		<category><![CDATA[windbg]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2405</guid>
		<description><![CDATA[Sometimes we could have a dump which does not load .pdb files even though they are present in the dump folder. The reason for the load failure is not necessarily every time a code change but could be just a rebuild of the source code. In such cases if you force load the .pdb file <a href='http://ntcoder.com/bab/2012/03/06/how-to-force-symbol-loading-in-windbg/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes we could have a dump which does not load .pdb files even though they are present in the dump folder. The reason for the load failure is not necessarily every time a code change but could be just a rebuild of the source code. In such cases if you force load the .pdb file you should get a call stack that makes sense but you got to be good at API&#8217;s and libraries to make sure the stack makes sense. So until you get a proper .pdb file you can force load a .pdb file and work on the dump.   <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />Remember: Always insist on correct pdb file.    <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />So the command to enable this feature is: &#8216;.symopt&#8217;. Lists out the current symbol loading options. On my machine this is what I get&#8230;</p>
<p><font face="Courier New">0:000&gt; .symopt     <br />Symbol options are 0&#215;30377:      <br />0&#215;00000001 &#8211; SYMOPT_CASE_INSENSITIVE      <br />0&#215;00000002 &#8211; SYMOPT_UNDNAME      <br />0&#215;00000004 &#8211; SYMOPT_DEFERRED_LOADS      <br />0&#215;00000010 &#8211; SYMOPT_LOAD_LINES      <br />0&#215;00000020 &#8211; SYMOPT_OMAP_FIND_NEAREST      <br />0&#215;00000100 &#8211; SYMOPT_NO_UNQUALIFIED_LOADS      <br />0&#215;00000200 &#8211; SYMOPT_FAIL_CRITICAL_ERRORS      <br />0&#215;00010000 &#8211; SYMOPT_AUTO_PUBLICS      <br />0&#215;00020000 &#8211; SYMOPT_NO_IMAGE_SEARCH</font></p>
<p>These flags determine how and what symbols will be loaded. These options also determine whether line number information should be loaded or not.</p>
<p>So in our debugging scenario if we want to load symbols in a loose manner, i.e., without strict mapping of .pdb with .exe we will have to enable the following option&#8230;</p>
<p><font face="Courier New">0&#215;00000040 &#8211; SYMOPT_LOAD_ANYTHING</font>&#160; </p>
<p>In windbg we do this via…    </p>
<p><font face="Courier New">0:000&gt; .symopt+ 0&#215;40     <br />Symbol options are 0&#215;30377:      <br />0&#215;00000001 &#8211; SYMOPT_CASE_INSENSITIVE      <br />0&#215;00000002 &#8211; SYMOPT_UNDNAME      <br />0&#215;00000004 &#8211; SYMOPT_DEFERRED_LOADS      <br />0&#215;00000010 &#8211; SYMOPT_LOAD_LINES      <br />0&#215;00000020 &#8211; SYMOPT_OMAP_FIND_NEAREST      <br /><font style="background-color: #ffff00">0&#215;00000040 &#8211; SYMOPT_LOAD_ANYTHING &lt;&#8212;&#8212;&#8212;&#8211; Prevents validation of .pdb file</font>      <br />0&#215;00000100 &#8211; SYMOPT_NO_UNQUALIFIED_LOADS      <br />0&#215;00000200 &#8211; SYMOPT_FAIL_CRITICAL_ERRORS      <br />0&#215;00010000 &#8211; SYMOPT_AUTO_PUBLICS      <br />0&#215;00020000 &#8211; SYMOPT_NO_IMAGE_SEARCH</font>    </p>
<p>To re-enable strict mapping between .exe and .pdb use    </p>
<p><font face="Courier New">0:000&gt; .symopt- 0&#215;40     <br />Symbol options are 0&#215;30377:      <br />0&#215;00000001 &#8211; SYMOPT_CASE_INSENSITIVE      <br />0&#215;00000002 &#8211; SYMOPT_UNDNAME      <br />0&#215;00000004 &#8211; SYMOPT_DEFERRED_LOADS      <br />0&#215;00000010 &#8211; SYMOPT_LOAD_LINES      <br />0&#215;00000020 &#8211; SYMOPT_OMAP_FIND_NEAREST      <br />0&#215;00000100 &#8211; SYMOPT_NO_UNQUALIFIED_LOADS      <br />0&#215;00000200 &#8211; SYMOPT_FAIL_CRITICAL_ERRORS      <br />0&#215;00010000 &#8211; SYMOPT_AUTO_PUBLICS      <br />0&#215;00020000 &#8211; SYMOPT_NO_IMAGE_SEARCH      <br /></font>    <br />Note the +/- in the above command. &#8216;+&#8217; enables, &#8216;-&#8217; disables.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F03%2F06%2Fhow-to-force-symbol-loading-in-windbg%2F&amp;title=How%20to%20force%20symbol%20loading%20in%20WinDbg" id="wpa2a_4"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/03/06/how-to-force-symbol-loading-in-windbg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VC11 Beta is now available</title>
		<link>http://ntcoder.com/bab/2012/03/01/vc11-beta-is-now-available/</link>
		<comments>http://ntcoder.com/bab/2012/03/01/vc11-beta-is-now-available/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 22:07:13 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[C++, VC++]]></category>
		<category><![CDATA[Visual C++ Compiler]]></category>
		<category><![CDATA[Visual studio]]></category>
		<category><![CDATA[VC11]]></category>
		<category><![CDATA[VC11 Beta]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2403</guid>
		<description><![CDATA[What&#8217;s New: http://blogs.msdn.com/b/vcblog/archive/2012/02/29/10272778.aspx Downloads: http://www.microsoft.com/visualstudio/11/en-us/downloads]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s New: <a href="http://blogs.msdn.com/b/vcblog/archive/2012/02/29/10272778.aspx">http://blogs.msdn.com/b/vcblog/archive/2012/02/29/10272778.aspx</a>    <br />Downloads: <a href="http://www.microsoft.com/visualstudio/11/en-us/downloads">http://www.microsoft.com/visualstudio/11/en-us/downloads</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F03%2F01%2Fvc11-beta-is-now-available%2F&amp;title=VC11%20Beta%20is%20now%20available" id="wpa2a_6"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/03/01/vc11-beta-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to list out binaries for which symbol loading failed</title>
		<link>http://ntcoder.com/bab/2012/02/27/how-to-list-out-binaries-for-which-symbol-loading-failed-2/</link>
		<comments>http://ntcoder.com/bab/2012/02/27/how-to-list-out-binaries-for-which-symbol-loading-failed-2/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 16:59:57 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[lme]]></category>
		<category><![CDATA[lml]]></category>
		<category><![CDATA[windbg]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2400</guid>
		<description><![CDATA[Use &#8216;lml&#8217; to list all dlls whose symbols has been loaded/failed to load, the list will also include dlls which failed symbol loading. See sample&#8230; 0:000&#62; lml start end module name 00000000`03d90000 00000000`040e3000 Test1 T (no symbols)&#160; 00000000`77d40000 00000000`77eb3000 kernel32 (private pdb symbols) c:\sym\kernel32.pdb\F0EC676938D745549823C7204D03B07B2\kernel32.pdb 00000000`77ec0000 00000000`77ffc000 ntdll (private pdb symbols) c:\sym\ntdll.pdb\C5666A2C21444EFAA53EB4F1CFBE56D22\ntdll.pdb 00000001`55600000 00000001`55801000 Test2 (export <a href='http://ntcoder.com/bab/2012/02/27/how-to-list-out-binaries-for-which-symbol-loading-failed-2/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Use &#8216;lml&#8217; to list all dlls whose symbols has been loaded/failed to load, the list will also include dlls which failed symbol loading. See sample&#8230;</p>
<p><font face="Courier New"><font style="background-color: #4bacc6">0:000&gt; lml</font>       <br />start end module name       <br />00000000`03d90000 00000000`040e3000 Test1 T (<font style="background-color: #ffff00">no symbols</font>)&#160; <br />00000000`77d40000 00000000`77eb3000 kernel32 (private pdb symbols) c:\sym\kernel32.pdb\F0EC676938D745549823C7204D03B07B2\kernel32.pdb       <br />00000000`77ec0000 00000000`77ffc000 ntdll (private pdb symbols) c:\sym\ntdll.pdb\C5666A2C21444EFAA53EB4F1CFBE56D22\ntdll.pdb       <br />00000001`55600000 00000001`55801000 Test2 (<font style="background-color: #ffff00">export symbols</font>) Test2.dll       <br />00000001`80000000 00000001`806c2000 Test3 T (<font style="background-color: #ffff00">no symbols</font>)&#160; <br />000007ff`57040000 000007ff`57071000 iphlpapi (private pdb symbols) c:\sym\iphlpapi.pdb\487BEF7A066A4E5DB7C0230E9B8564CA2\iphlpapi.pdb       <br />000007ff`57140000 000007ff`573c5000 ole32 (private pdb symbols) c:\sym\ole32.pdb\7DDC15A822B0415CAD8C3BC2BF86C3082\ole32.pdb       <br />000007ff`77310000 000007ff`77340000 ws2_32 (private pdb symbols) c:\sym\ws2_32.pdb\89321AB9C6CD443FB74F07BA57B507452\ws2_32.pdb       <br />000007ff`7fd30000 000007ff`7fed0000 rpcrt4 (private pdb symbols) c:\sym\rpcrt4.pdb\8852BC6255D84F43A64A5FA4BE7D74162\rpcrt4.pdb       <br /></font>    <br />I&#8217;ve highlighted the dlls which failed symbol loading.</p>
<p>Use &#8216;lme&#8217; if you want to list only those dlls which failed symbol loading. See sample&#8230;    <br /><font face="Courier New"><font style="background-color: #4bacc6">0:000&gt; lme</font>       <br />start end module name       <br />00000000`03d90000 00000000`040e3000 Test1 T (<font style="background-color: #ffff00">no symbols</font>)&#160; <br />00000001`55600000 00000001`55801000 Test2 (<font style="background-color: #ffff00">export symbols</font>) Test2.dll       <br />00000001`80000000 00000001`806c2000 Test3 T (<font style="background-color: #ffff00">no symbols</font>)</font></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F02%2F27%2Fhow-to-list-out-binaries-for-which-symbol-loading-failed-2%2F&amp;title=How%20to%20list%20out%20binaries%20for%20which%20symbol%20loading%20failed" id="wpa2a_8"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/02/27/how-to-list-out-binaries-for-which-symbol-loading-failed-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to search a range of addresses using &#8216;s&#8217; command in WinDbg</title>
		<link>http://ntcoder.com/bab/2012/02/24/how-to-search-a-range-of-addresses-using-s-command-in-windbg/</link>
		<comments>http://ntcoder.com/bab/2012/02/24/how-to-search-a-range-of-addresses-using-s-command-in-windbg/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 19:32:33 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Searching for a string in an address range]]></category>
		<category><![CDATA[windbg]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2390</guid>
		<description><![CDATA[-&#62; Please note for demo purpose we are using current thread stack range as address range: poi(@$teb+8) poi(@$teb+4) &#60;- Search for an ascii string beginning with &#34;Rtl&#34; s -a poi(@$teb+8) poi(@$teb+4) &#34;Rtl&#34; //Output 0fd3d906 52 74 6c 47 65 74 50 72-6f 64 75 63 74 49 6e 66 RtlGetProductInf Search for a unicode string <a href='http://ntcoder.com/bab/2012/02/24/how-to-search-a-range-of-addresses-using-s-command-in-windbg/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>-&gt; Please note for demo purpose we are using current thread stack range as address range: <font style="background-color: #a5b592">poi(@$teb+8) poi(@$teb+4)</font> &lt;-</p>
<p><strong><u>Search for an ascii string beginning with &quot;Rtl&quot;</u>       <br /></strong><font style="background-color: #a5b592">s -a poi(@$teb+8) poi(@$teb+4) &quot;Rtl&quot;     <br /></font>//Output     <br /><font style="background-color: #ffff00">0fd3d906 52 74 6c 47 65 74 50 72-6f 64 75 63 74 49 6e 66 RtlGetProductInf</font></p>
<p><strong><u>Search for a unicode string &quot;AgentService&quot;</u>       <br /></strong><font style="background-color: #a5b592">s -u poi(@$teb+8) poi(@$teb+4) &quot;AgentService&quot; </font>    <br />//Output     <br /><font style="background-color: #ffff00">0fd3ed7c 0041 0067 0065 006e 0074 0053 0065 0072 A.g.e.n.t.S.e.r.      <br />0fd3edec 0041 0067 0065 006e 0074 0053 0065 0072 A.g.e.n.t.S.e.r.       <br /></font></p>
<p><strong><u>       <br />Display all ascii strings which are at least 8 in length</u>       <br /></strong><font style="background-color: #a5b592">s -[l8]sa poi(@$teb+8) poi(@$teb+4) </font>    <br />// Output     <br /><font style="background-color: #ffff00">0fd3d0d4 &quot;mscorlib.pdb&quot;      <br />0fd3d906 &quot;RtlGetProductInfo&quot;       <br /></font></p>
<p><strong><u>       <br />Display all unicode strings which are at least 58 in length</u></strong>     <br /><font style="background-color: #a5b592">s -[l58]su poi(@$teb+8) poi(@$teb+4)</font>    <br />// Output     <br /><font style="background-color: #ffff00">0fd3bc08 &quot;謬矐뻬࿓ilC:\Windows\WinSxS\x86_micr&quot;      <br />0fd3bc48 &quot;osoft.vc80.crt_1fc8b3b9a1e18e3b_&quot;       <br />0fd3bc88 &quot;8.0.50727.6195_none_d09154e04427&quot;       <br />0fd3bcc8 &quot;2b9a&quot;</font></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F02%2F24%2Fhow-to-search-a-range-of-addresses-using-s-command-in-windbg%2F&amp;title=How%20to%20search%20a%20range%20of%20addresses%20using%20%26%238216%3Bs%26%238217%3B%20command%20in%20WinDbg" id="wpa2a_10"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/02/24/how-to-search-a-range-of-addresses-using-s-command-in-windbg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable LARGEADDRESSAWARE?</title>
		<link>http://ntcoder.com/bab/2012/02/22/how-to-enable-largeaddressaware/</link>
		<comments>http://ntcoder.com/bab/2012/02/22/how-to-enable-largeaddressaware/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 15:58:14 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[C++, VC++]]></category>
		<category><![CDATA[DevTools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[dumpbin]]></category>
		<category><![CDATA[EditBin]]></category>
		<category><![CDATA[LARGEADDRESSAWARE]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2388</guid>
		<description><![CDATA[The command to enable large address aware is as follows&#8230; EditBin /LARGEADDRESSAWARE NotePad.exe How to check if the above command worked or not? Run the above executable (in our case NotePad.exe) with DumpBin.exe. C:\&#62; DumpBin /Headers NotePad.exe FILE HEADER VALUES &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 14C machine (x86) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4 number of sections &#160;&#160;&#160;&#160;&#160;&#160;&#160; 4BA1DC16 time date stamp Thu <a href='http://ntcoder.com/bab/2012/02/22/how-to-enable-largeaddressaware/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>The command to enable large address aware is as follows&#8230;</p>
<p>EditBin /LARGEADDRESSAWARE NotePad.exe</p>
<p>How to check if the above command worked or not? Run the above executable (in our case NotePad.exe) with DumpBin.exe.</p>
<p>C:\&gt; DumpBin /Headers NotePad.exe</p>
<p>FILE HEADER VALUES   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 14C machine (x86)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4 number of sections    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4BA1DC16 time date stamp Thu Mar 18 02:53:58 2010    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 file pointer to symbol table    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0 number of symbols    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; E0 size of optional header    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 122 characteristics    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Executable    <br /><font style="background-color: #ffff00">Application can handle large (&gt;2GB) addresses</font>    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 32 bit word machine</p>
<p>See highlighted line.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F02%2F22%2Fhow-to-enable-largeaddressaware%2F&amp;title=How%20to%20enable%20LARGEADDRESSAWARE%3F" id="wpa2a_12"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/02/22/how-to-enable-largeaddressaware/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>systeminfo command</title>
		<link>http://ntcoder.com/bab/2012/02/09/systeminfo-command/</link>
		<comments>http://ntcoder.com/bab/2012/02/09/systeminfo-command/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 22:25:58 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[systeminfo]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2385</guid>
		<description><![CDATA[To gather system information of a computer running windows use the command &#8216;SystemInfo&#8217;. The command gathers following information&#8230; 1. Operating system information 2. Processor information 3. Input local information 4. Installed hotfix information 5. Network card information A good way to use this command is to redirect output to a file, for e.g. SystemInfo &#62; <a href='http://ntcoder.com/bab/2012/02/09/systeminfo-command/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>To gather system information of a computer running windows use the command &#8216;SystemInfo&#8217;. The command gathers following information&#8230;</p>
<p>1. Operating system information   <br />2. Processor information    <br />3. Input local information    <br />4. Installed hotfix information    <br />5. Network card information</p>
<p>A good way to use this command is to redirect output to a file, for e.g. SystemInfo &gt; D:\SystemInfo.txt. Another option is to run it straight from &quot;Start-&gt;Run-&gt;cmd /c systeminfo &gt; D:\nibu.txt&quot;</p>
<p>Good for creating repro&#8217;s, VM&#8217;s and to know what hotfixes are installed on the machine.</p>
<p>To get help on the command use: SystemInfo /?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F02%2F09%2Fsysteminfo-command%2F&amp;title=systeminfo%20command" id="wpa2a_14"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/02/09/systeminfo-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>__noop intrinsic</title>
		<link>http://ntcoder.com/bab/2012/01/06/__noop-intrinsic/</link>
		<comments>http://ntcoder.com/bab/2012/01/06/__noop-intrinsic/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 19:51:00 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[C++, VC++]]></category>
		<category><![CDATA[Visual C++ Compiler]]></category>
		<category><![CDATA[compiler intrinsics]]></category>
		<category><![CDATA[visual c++]]></category>
		<category><![CDATA[__noop]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2379</guid>
		<description><![CDATA[What do we mean by intrinsic? Most functions are contained in libraries, but some functions are built in (that is, intrinsic) to the compiler. These are referred to as intrinsic functions or intrinsics. Taken from MSDN… The __noop intrinsic specifies that a function should be ignored and the argument list be parsed but no code <a href='http://ntcoder.com/bab/2012/01/06/__noop-intrinsic/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>What do we mean by intrinsic?</p>
<p>Most functions are contained in libraries, but some functions are built in (that is, intrinsic) to the compiler. These are referred to as intrinsic functions or intrinsics.</p>
<p><span style="text-decoration: underline;">Taken from MSDN…</span></p>
<p>The <em>__noop</em> intrinsic specifies that a function should be ignored and the argument list be parsed but no code be generated for the arguments. It is intended for use in global debug functions that take a variable number of arguments.</p>
<p>The compiler converts the <em>__noop</em> intrinsic to 0 at compile time. The following code shows how you could use <em>__noop</em>.<br />
 </p>
<pre class="brush: cpp; title: ; notranslate">// compiler_intrinsics__noop.cpp
// compile with or without /DDEBUG
#include &lt;stdio.h&gt;

#if DEBUG
   #define PRINT   printf_s
#else
   #define PRINT   __noop
#endif

int main()
{
   PRINT(&quot;\nhello\n&quot;);
}</pre>
<p>So if you have custom macros which should expand to nought in release version the proper way to do this would be via <em>__noop</em>. Remember this is Microsoft(R) specific.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F01%2F06%2F__noop-intrinsic%2F&amp;title=__noop%20intrinsic" id="wpa2a_16"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/01/06/__noop-intrinsic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.loadby sos clr fails! Why?</title>
		<link>http://ntcoder.com/bab/2012/01/06/loadby-sos-clr-fails-why/</link>
		<comments>http://ntcoder.com/bab/2012/01/06/loadby-sos-clr-fails-why/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 18:30:00 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[loadby]]></category>
		<category><![CDATA[sos]]></category>
		<category><![CDATA[windbg]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/?p=2376</guid>
		<description><![CDATA[You have a managed application crash dump and you would like to load sos.dll, to use the powerful commands it provides to help with managed debugging, but the load of sos.dll always fails. The command that you are executing for loading sos.dll is… 0:015&#62; .loadby sos clr Unable to find module &#8216;clr&#8217; On enter you <a href='http://ntcoder.com/bab/2012/01/06/loadby-sos-clr-fails-why/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>You have a managed application crash dump and you would like to load sos.dll, to use the powerful commands it provides to help with managed debugging, but the load of sos.dll always fails. The command that you are executing for loading sos.dll is…</p>
<p>0:015&gt; .loadby sos clr   <br />Unable to find module &#8216;clr&#8217;</p>
<p>On enter you see the above error and you are not sure what is going on. So in order to understand the error message it is important to understand what .loadby command does.</p>
<p>“.loadby sos clr” means load sos.dll from where clr.dll is loaded. So as you might have guessed by now if clr.dll is not loaded then sos.dll cannot be found. This is what the error means when it says “Unable to find module ‘clr’”. All it means is clr.dll is not in the loaded module list which means there is no path to locate clr.dll.</p>
<p>So how can I fix this error? In order to fix this error you must understand that clr.dll has been introduced into .net applications from .net 4.0 and prior to that we used to have mscorwks.dll. So if your .net application is not a 4.0 app then clr.dll won’t be loaded, yes you will have to use mscorwks.dll instead…</p>
<p>0:015&gt; .loadby sos mscorwks   </p>
<p>But you are damn sure that the application that crashed is a .net 4.0 application but you still see the error! All I can say is clr.dll is not loaded. Wait for it to load or break on its load and then execute .loadby sos clr.</p>
<p>So how to break on a module load…   <br />0:015&gt; sxe ld clr</p>
<p>This will for sure help!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2012%2F01%2F06%2Floadby-sos-clr-fails-why%2F&amp;title=.loadby%20sos%20clr%20fails%21%20Why%3F" id="wpa2a_18"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2012/01/06/loadby-sos-clr-fails-why/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hidden VC++ compiler switches: /d1reportSingleClassLayoutSomeType</title>
		<link>http://ntcoder.com/bab/2011/11/15/hidden-vc-compiler-switches-d1reportsingleclasslayoutsometype/</link>
		<comments>http://ntcoder.com/bab/2011/11/15/hidden-vc-compiler-switches-d1reportsingleclasslayoutsometype/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 15:53:38 +0000</pubDate>
		<dc:creator>Nibu Thomas</dc:creator>
				<category><![CDATA[C++, VC++]]></category>
		<category><![CDATA[d1reportSingleClassLayoutSomeType]]></category>
		<category><![CDATA[Hidden compiler options]]></category>
		<category><![CDATA[VC++ Compiler option]]></category>

		<guid isPermaLink="false">http://ntcoder.com/bab/2011/11/15/hidden-vc-compiler-switches-d1reportsingleclasslayoutsometype/</guid>
		<description><![CDATA[Did you ever want to know how a C++ class was laid out by VC++ compiler? There are few hidden switches which are not known to many hence would like to share those with my blog readers. So I will blog about these switches one by one. So for today the switch I’m going to <a href='http://ntcoder.com/bab/2011/11/15/hidden-vc-compiler-switches-d1reportsingleclasslayoutsometype/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Did you ever want to know how a C++ class was laid out by VC++ compiler? There are few hidden switches which are not known to many hence would like to share those with my blog readers.</p>
<p>So I will blog about these switches one by one. So for today the switch I’m going to discuss is: <em>/d1reportSingleClassLayoutSomeType. SomeType</em> in the name is just a placeholder for actual class name.</p>
<p>So for a demo we know that there is a class called <em>CDialog</em> in MFC. So create a sample MFC project and add the following command line manually to the project’s settings. Goto <em>C/C++-&gt;CommandLine-&gt;Additional Options</em> and enter <em>/d1reportSingleClassLayoutCDialog </em>manually into the additional options edit control, as shown in the screenshot below…</p>
<p><a href="http://ntcoder.com/bab/wp-content/uploads/2011/11/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="MFC Project Properties" src="http://ntcoder.com/bab/wp-content/uploads/2011/11/image_thumb.png" alt="MFC Project Properties" width="487" height="346" border="0" /></a></p>
<p>Once you are done rebuild your project. When I rebuild this is what I see in my output window. You will see the structure of <em>CDialog</em> laid out in the output window. Please know that <em>CDialog</em> is a huge class with several virtual functions hence the output is pretty long.</p>
<pre class="brush: cpp; title: ; notranslate">1&gt;------ Rebuild All started: Project: MFCTest, Configuration: Debug Win32 ------
1&gt;  stdafx.cpp
1&gt;  class CDialog size(148):
1&gt;   +---
1&gt;   | +--- (base class CWnd)
1&gt;   | | +--- (base class CCmdTarget)
1&gt;   | | | +--- (base class CObject)
1&gt;   0 | | | | {vfptr}
1&gt;   | | | +---
1&gt;   4 | | | m_dwRef
1&gt;   8 | | | m_pOuterUnknown
1&gt;  12 | | | m_xInnerUnknown
1&gt;  16 | | | XDispatch m_xDispatch
1&gt;  20 | | | m_bResultExpected
1&gt;  24 | | | XConnPtContainer m_xConnPtContainer
1&gt;  28 | | | m_pModuleState
1&gt;   | | +---
1&gt;  32 | | m_hWnd
1&gt;  36 | | m_bEnableActiveAccessibility
1&gt;     | | &lt;alignment member&gt; (size=3)
1&gt;  40 | | m_pStdObject
1&gt;  44 | | m_pProxy
1&gt;  48 | | XAccessible m_xAccessible
1&gt;  52 | | XAccessibleServer m_xAccessibleServer
1&gt;  56 | | m_bIsTouchWindowRegistered
1&gt;  60 | | CPoint m_ptGestureFrom
1&gt;  68 | | m_ulGestureArg
1&gt;  76 | | m_bGestureInited
1&gt;  80 | | m_pCurrentGestureInfo
1&gt;  84 | | m_hWndOwner
1&gt;  88 | | m_nFlags
1&gt;  92 | | m_pfnSuper
1&gt;  96 | | m_nModalResult
1&gt;  100 | | m_pDropTarget
1&gt;  104 | | m_pCtrlCont
1&gt;  108 | | m_pCtrlSite
1&gt;  112 | | m_pMFCCtrlContainer
1&gt;   | +---
1&gt;  116 | m_nIDHelp
1&gt;  120 | m_lpszTemplateName
1&gt;  124 | m_hDialogTemplate
1&gt;  128 | m_lpDialogTemplate
1&gt;  132 | m_lpDialogInit
1&gt;  136 | m_pParentWnd
1&gt;  140 | m_hWndTop
1&gt;  144 | m_pOccDialogInfo
1&gt;   +---
1&gt; 
1&gt;  CDialog::$vftable@:
1&gt;   | &amp;CDialog_meta
1&gt;   |  0
1&gt;   0 | &amp;CDialog::GetRuntimeClass
1&gt;   1 | &amp;CDialog::{dtor}
1&gt;   2 | &amp;CObject::Serialize
1&gt;   3 | &amp;CDialog::AssertValid
1&gt;   4 | &amp;CDialog::Dump
1&gt;   5 | &amp;CDialog::OnCmdMsg
1&gt;   6 | &amp;CWnd::OnFinalRelease
1&gt;   7 | &amp;CCmdTarget::IsInvokeAllowed
1&gt;   8 | &amp;CCmdTarget::GetDispatchIID
1&gt;   9 | &amp;CCmdTarget::GetTypeInfoCount
1&gt;  10 | &amp;CCmdTarget::GetTypeLibCache
1&gt;  11 | &amp;CCmdTarget::GetTypeLib
1&gt;  12 | &amp;CDialog::GetMessageMap
1&gt;  13 | &amp;CCmdTarget::GetCommandMap
1&gt;  14 | &amp;CCmdTarget::GetDispatchMap
1&gt;  15 | &amp;CCmdTarget::GetConnectionMap
1&gt;  16 | &amp;CWnd::GetInterfaceMap
1&gt;  17 | &amp;CCmdTarget::GetEventSinkMap
1&gt;  18 | &amp;CCmdTarget::OnCreateAggregates
1&gt;  19 | &amp;CCmdTarget::GetInterfaceHook
1&gt;  20 | &amp;CCmdTarget::GetExtraConnectionPoints
1&gt;  21 | &amp;CCmdTarget::GetConnectionHook
1&gt;  22 | &amp;CWnd::PreSubclassWindow
1&gt;  23 | &amp;CWnd::Create
1&gt;  24 | &amp;CWnd::CreateEx
1&gt;  25 | &amp;CWnd::CreateEx
1&gt;  26 | &amp;CWnd::DestroyWindow
1&gt;  27 | &amp;CWnd::PreCreateWindow
1&gt;  28 | &amp;CWnd::CalcWindowRect
1&gt;  29 | &amp;CWnd::GetMenu
1&gt;  30 | &amp;CWnd::SetMenu
1&gt;  31 | &amp;CWnd::OnToolHitTest
1&gt;  32 | &amp;CWnd::GetScrollBarCtrl
1&gt;  33 | &amp;CWnd::WinHelpW
1&gt;  34 | &amp;CWnd::HtmlHelpW
1&gt;  35 | &amp;CWnd::WinHelpInternal
1&gt;  36 | &amp;CWnd::ContinueModal
1&gt;  37 | &amp;CWnd::EndModalLoop
1&gt;  38 | &amp;CWnd::OnDrawIconicThumbnailOrLivePreview
1&gt;  39 | &amp;CWnd::EnsureStdObj
1&gt;  40 | &amp;CWnd::get_accParent
1&gt;  41 | &amp;CWnd::get_accChildCount
1&gt;  42 | &amp;CWnd::get_accChild
1&gt;  43 | &amp;CWnd::get_accName
1&gt;  44 | &amp;CWnd::get_accValue
1&gt;  45 | &amp;CWnd::get_accDescription
1&gt;  46 | &amp;CWnd::get_accRole
1&gt;  47 | &amp;CWnd::get_accState
1&gt;  48 | &amp;CWnd::get_accHelp
1&gt;  49 | &amp;CWnd::get_accHelpTopic
1&gt;  50 | &amp;CWnd::get_accKeyboardShortcut
1&gt;  51 | &amp;CWnd::get_accFocus
1&gt;  52 | &amp;CWnd::get_accSelection
1&gt;  53 | &amp;CWnd::get_accDefaultAction
1&gt;  54 | &amp;CWnd::accSelect
1&gt;  55 | &amp;CWnd::accLocation
1&gt;  56 | &amp;CWnd::accNavigate
1&gt;  57 | &amp;CWnd::accHitTest
1&gt;  58 | &amp;CWnd::accDoDefaultAction
1&gt;  59 | &amp;CWnd::put_accName
1&gt;  60 | &amp;CWnd::put_accValue
1&gt;  61 | &amp;CWnd::SetProxy
1&gt;  62 | &amp;CWnd::CreateAccessibleProxy
1&gt;  63 | &amp;CWnd::OnCommand
1&gt;  64 | &amp;CWnd::OnNotify
1&gt;  65 | &amp;CWnd::GetSuperWndProcAddr
1&gt;  66 | &amp;CWnd::DoDataExchange
1&gt;  67 | &amp;CWnd::BeginModalState
1&gt;  68 | &amp;CWnd::EndModalState
1&gt;  69 | &amp;CDialog::PreTranslateMessage
1&gt;  70 | &amp;CWnd::OnAmbientProperty
1&gt;  71 | &amp;CWnd::WindowProc
1&gt;  72 | &amp;CWnd::OnWndMsg
1&gt;  73 | &amp;CWnd::DefWindowProcW
1&gt;  74 | &amp;CWnd::PostNcDestroy
1&gt;  75 | &amp;CWnd::OnChildNotify
1&gt;  76 | &amp;CWnd::OnTouchInputs
1&gt;  77 | &amp;CWnd::OnTouchInput
1&gt;  78 | &amp;CWnd::GetGestureStatus
1&gt;  79 | &amp;CWnd::OnGestureZoom
1&gt;  80 | &amp;CWnd::OnGesturePan
1&gt;  81 | &amp;CWnd::OnGestureRotate
1&gt;  82 | &amp;CWnd::OnGestureTwoFingerTap
1&gt;  83 | &amp;CWnd::OnGesturePressAndTap
1&gt;  84 | &amp;CDialog::CheckAutoCenter
1&gt;  85 | &amp;CWnd::IsFrameWnd
1&gt;  86 | &amp;CWnd::CreateControlContainer
1&gt;  87 | &amp;CWnd::CreateControlSite
1&gt;  88 | &amp;CDialog::SetOccDialogInfo
1&gt;  89 | &amp;CDialog::GetOccDialogInfo
1&gt;  90 | &amp;CDialog::Create
1&gt;  91 | &amp;CDialog::Create
1&gt;  92 | &amp;CDialog::CreateIndirect
1&gt;  93 | &amp;CDialog::CreateIndirect
1&gt;  94 | &amp;CDialog::DoModal
1&gt;  95 | &amp;CDialog::OnInitDialog
1&gt;  96 | &amp;CDialog::OnSetFont
1&gt;  97 | &amp;CDialog::OnOK
1&gt;  98 | &amp;CDialog::OnCancel
1&gt;  99 | &amp;CDialog::PreInitDialog
1&gt; 
1&gt;  CDialog::GetRuntimeClass this adjustor: 0
1&gt;  CDialog::Create this adjustor: 0
1&gt;  CDialog::Create this adjustor: 0
1&gt;  CDialog::CreateIndirect this adjustor: 0
1&gt;  CDialog::CreateIndirect this adjustor: 0
1&gt;  CDialog::DoModal this adjustor: 0
1&gt;  CDialog::OnInitDialog this adjustor: 0
1&gt;  CDialog::OnSetFont this adjustor: 0
1&gt;  CDialog::OnOK this adjustor: 0
1&gt;  CDialog::OnCancel this adjustor: 0
1&gt;  CDialog::{dtor} this adjustor: 0
1&gt;  CDialog::AssertValid this adjustor: 0
1&gt;  CDialog::Dump this adjustor: 0
1&gt;  CDialog::PreTranslateMessage this adjustor: 0
1&gt;  CDialog::OnCmdMsg this adjustor: 0
1&gt;  CDialog::CheckAutoCenter this adjustor: 0
1&gt;  CDialog::SetOccDialogInfo this adjustor: 0
1&gt;  CDialog::GetOccDialogInfo this adjustor: 0
1&gt;  CDialog::PreInitDialog this adjustor: 0
1&gt;  CDialog::GetMessageMap this adjustor: 0
1&gt;  CDialog::__delDtor this adjustor: 0
1&gt;  CDialog::__vecDelDtor this adjustor: 0
1&gt; 
1&gt; 
1&gt;  class CDialogBar size(200):
1&gt;   +---
1&gt;   | +--- (base class CControlBar)
1&gt;   | | +--- (base class CWnd)
1&gt;   | | | +--- (base class CCmdTarget)
1&gt;   | | | | +--- (base class CObject)
1&gt;   0 | | | | | {vfptr}
1&gt;   | | | | +---
1&gt;   4 | | | | m_dwRef
1&gt;   8 | | | | m_pOuterUnknown
1&gt;  12 | | | | m_xInnerUnknown
1&gt;  16 | | | | XDispatch m_xDispatch
1&gt;  20 | | | | m_bResultExpected
1&gt;  24 | | | | XConnPtContainer m_xConnPtContainer
1&gt;  28 | | | | m_pModuleState
1&gt;   | | | +---
1&gt;  32 | | | m_hWnd
1&gt;  36 | | | m_bEnableActiveAccessibility
1&gt;     | | | &lt;alignment member&gt; (size=3)
1&gt;  40 | | | m_pStdObject
1&gt;  44 | | | m_pProxy
1&gt;  48 | | | XAccessible m_xAccessible
1&gt;  52 | | | XAccessibleServer m_xAccessibleServer
1&gt;  56 | | | m_bIsTouchWindowRegistered
1&gt;  60 | | | CPoint m_ptGestureFrom
1&gt;  68 | | | m_ulGestureArg
1&gt;  76 | | | m_bGestureInited
1&gt;  80 | | | m_pCurrentGestureInfo
1&gt;  84 | | | m_hWndOwner
1&gt;  88 | | | m_nFlags
1&gt;  92 | | | m_pfnSuper
1&gt;  96 | | | m_nModalResult
1&gt;  100 | | | m_pDropTarget
1&gt;  104 | | | m_pCtrlCont
1&gt;  108 | | | m_pCtrlSite
1&gt;  112 | | | m_pMFCCtrlContainer
1&gt;   | | +---
1&gt;  116 | | m_pInPlaceOwner
1&gt;  120 | | m_bAutoDelete
1&gt;  124 | | m_cxLeftBorder
1&gt;  128 | | m_cxRightBorder
1&gt;  132 | | m_cyTopBorder
1&gt;  136 | | m_cyBottomBorder
1&gt;  140 | | m_cxDefaultGap
1&gt;  144 | | m_nMRUWidth
1&gt;  148 | | m_nCount
1&gt;  152 | | m_pData
1&gt;  156 | | m_hReBarTheme
1&gt;  160 | | m_nStateFlags
1&gt;  164 | | m_dwStyle
1&gt;  168 | | m_dwDockStyle
1&gt;  172 | | m_pDockSite
1&gt;  176 | | m_pDockBar
1&gt;  180 | | m_pDockContext
1&gt;   | +---
1&gt;  184 | CSize m_sizeDefault
1&gt;  192 | m_pOccDialogInfo
1&gt;  196 | m_lpszTemplateName
1&gt;   +---
1&gt; 
1&gt;  CDialogBar::$vftable@:
1&gt;   | &amp;CDialogBar_meta
1&gt;   |  0
1&gt;   0 | &amp;CDialogBar::GetRuntimeClass
1&gt;   1 | &amp;CDialogBar::{dtor}
1&gt;   2 | &amp;CObject::Serialize
1&gt;   3 | &amp;CControlBar::AssertValid
1&gt;   4 | &amp;CControlBar::Dump
1&gt;   5 | &amp;CCmdTarget::OnCmdMsg
1&gt;   6 | &amp;CWnd::OnFinalRelease
1&gt;   7 | &amp;CCmdTarget::IsInvokeAllowed
1&gt;   8 | &amp;CCmdTarget::GetDispatchIID
1&gt;   9 | &amp;CCmdTarget::GetTypeInfoCount
1&gt;  10 | &amp;CCmdTarget::GetTypeLibCache
1&gt;  11 | &amp;CCmdTarget::GetTypeLib
1&gt;  12 | &amp;CDialogBar::GetMessageMap
1&gt;  13 | &amp;CCmdTarget::GetCommandMap
1&gt;  14 | &amp;CCmdTarget::GetDispatchMap
1&gt;  15 | &amp;CCmdTarget::GetConnectionMap
1&gt;  16 | &amp;CWnd::GetInterfaceMap
1&gt;  17 | &amp;CCmdTarget::GetEventSinkMap
1&gt;  18 | &amp;CCmdTarget::OnCreateAggregates
1&gt;  19 | &amp;CCmdTarget::GetInterfaceHook
1&gt;  20 | &amp;CCmdTarget::GetExtraConnectionPoints
1&gt;  21 | &amp;CCmdTarget::GetConnectionHook
1&gt;  22 | &amp;CWnd::PreSubclassWindow
1&gt;  23 | &amp;CWnd::Create
1&gt;  24 | &amp;CWnd::CreateEx
1&gt;  25 | &amp;CWnd::CreateEx
1&gt;  26 | &amp;CControlBar::DestroyWindow
1&gt;  27 | &amp;CControlBar::PreCreateWindow
1&gt;  28 | &amp;CWnd::CalcWindowRect
1&gt;  29 | &amp;CWnd::GetMenu
1&gt;  30 | &amp;CWnd::SetMenu
1&gt;  31 | &amp;CWnd::OnToolHitTest
1&gt;  32 | &amp;CWnd::GetScrollBarCtrl
1&gt;  33 | &amp;CWnd::WinHelpW
1&gt;  34 | &amp;CWnd::HtmlHelpW
1&gt;  35 | &amp;CWnd::WinHelpInternal
1&gt;  36 | &amp;CWnd::ContinueModal
1&gt;  37 | &amp;CWnd::EndModalLoop
1&gt;  38 | &amp;CWnd::OnDrawIconicThumbnailOrLivePreview
1&gt;  39 | &amp;CWnd::EnsureStdObj
1&gt;  40 | &amp;CWnd::get_accParent
1&gt;  41 | &amp;CWnd::get_accChildCount
1&gt;  42 | &amp;CWnd::get_accChild
1&gt;  43 | &amp;CWnd::get_accName
1&gt;  44 | &amp;CWnd::get_accValue
1&gt;  45 | &amp;CWnd::get_accDescription
1&gt;  46 | &amp;CWnd::get_accRole
1&gt;  47 | &amp;CWnd::get_accState
1&gt;  48 | &amp;CWnd::get_accHelp
1&gt;  49 | &amp;CWnd::get_accHelpTopic
1&gt;  50 | &amp;CWnd::get_accKeyboardShortcut
1&gt;  51 | &amp;CWnd::get_accFocus
1&gt;  52 | &amp;CWnd::get_accSelection
1&gt;  53 | &amp;CWnd::get_accDefaultAction
1&gt;  54 | &amp;CWnd::accSelect
1&gt;  55 | &amp;CWnd::accLocation
1&gt;  56 | &amp;CWnd::accNavigate
1&gt;  57 | &amp;CWnd::accHitTest
1&gt;  58 | &amp;CWnd::accDoDefaultAction
1&gt;  59 | &amp;CWnd::put_accName
1&gt;  60 | &amp;CWnd::put_accValue
1&gt;  61 | &amp;CWnd::SetProxy
1&gt;  62 | &amp;CWnd::CreateAccessibleProxy
1&gt;  63 | &amp;CWnd::OnCommand
1&gt;  64 | &amp;CWnd::OnNotify
1&gt;  65 | &amp;CWnd::GetSuperWndProcAddr
1&gt;  66 | &amp;CWnd::DoDataExchange
1&gt;  67 | &amp;CWnd::BeginModalState
1&gt;  68 | &amp;CWnd::EndModalState
1&gt;  69 | &amp;CControlBar::PreTranslateMessage
1&gt;  70 | &amp;CWnd::OnAmbientProperty
1&gt;  71 | &amp;CControlBar::WindowProc
1&gt;  72 | &amp;CWnd::OnWndMsg
1&gt;  73 | &amp;CWnd::DefWindowProcW
1&gt;  74 | &amp;CControlBar::PostNcDestroy
1&gt;  75 | &amp;CWnd::OnChildNotify
1&gt;  76 | &amp;CWnd::OnTouchInputs
1&gt;  77 | &amp;CWnd::OnTouchInput
1&gt;  78 | &amp;CWnd::GetGestureStatus
1&gt;  79 | &amp;CWnd::OnGestureZoom
1&gt;  80 | &amp;CWnd::OnGesturePan
1&gt;  81 | &amp;CWnd::OnGestureRotate
1&gt;  82 | &amp;CWnd::OnGestureTwoFingerTap
1&gt;  83 | &amp;CWnd::OnGesturePressAndTap
1&gt;  84 | &amp;CWnd::CheckAutoCenter
1&gt;  85 | &amp;CWnd::IsFrameWnd
1&gt;  86 | &amp;CWnd::CreateControlContainer
1&gt;  87 | &amp;CWnd::CreateControlSite
1&gt;  88 | &amp;CDialogBar::SetOccDialogInfo
1&gt;  89 | &amp;CWnd::GetOccDialogInfo
1&gt;  90 | &amp;CDialogBar::CalcFixedLayout
1&gt;  91 | &amp;CControlBar::CalcDynamicLayout
1&gt;  92 | &amp;CDialogBar::OnUpdateCmdUI
1&gt;  93 | &amp;CControlBar::CalcInsideRect
1&gt;  94 | &amp;CControlBar::DoPaint
1&gt;  95 | &amp;CControlBar::DrawBorders
1&gt;  96 | &amp;CControlBar::DrawGripper
1&gt;  97 | &amp;CControlBar::DrawNCGripper
1&gt;  98 | &amp;CControlBar::DrawThemedGripper
1&gt;  99 | &amp;CControlBar::DrawNonThemedGripper
1&gt;  100 | &amp;CControlBar::DelayShow
1&gt;  101 | &amp;CControlBar::IsVisible
1&gt;  102 | &amp;CControlBar::RecalcDelayShow
1&gt;  103 | &amp;CControlBar::IsDockBar
1&gt;  104 | &amp;CControlBar::OnBarStyleChange
1&gt;  105 | &amp;CControlBar::SetStatusText
1&gt;  106 | &amp;CDialogBar::Create
1&gt;  107 | &amp;CDialogBar::Create
1&gt; 
1&gt;  CDialogBar::GetRuntimeClass this adjustor: 0
1&gt;  CDialogBar::Create this adjustor: 0
1&gt;  CDialogBar::Create this adjustor: 0
1&gt;  CDialogBar::{dtor} this adjustor: 0
1&gt;  CDialogBar::CalcFixedLayout this adjustor: 0
1&gt;  CDialogBar::OnUpdateCmdUI this adjustor: 0
1&gt;  CDialogBar::SetOccDialogInfo this adjustor: 0
1&gt;  CDialogBar::GetMessageMap this adjustor: 0
1&gt;  CDialogBar::__delDtor this adjustor: 0
1&gt;  CDialogBar::__vecDelDtor this adjustor: 0
1&gt; 
1&gt; 
1&gt;  class CDialogImpl size(8):
1&gt;   +---
1&gt;   0 | {vfptr}
1&gt;   4 | m_Dlg
1&gt;   +---
1&gt; 
1&gt;  CDialogImpl::$vftable@:
1&gt;   | &amp;CDialogImpl_meta
1&gt;   |  0
1&gt;   0 | &amp;CDialogImpl::{dtor}
1&gt; 
1&gt;  CDialogImpl::{dtor} this adjustor: 0
1&gt;  CDialogImpl::__delDtor this adjustor: 0
1&gt;  CDialogImpl::__vecDelDtor this adjustor: 0
1&gt; 
1&gt; 
1&gt;  class CDialogEx size(184):
1&gt;   +---
1&gt;   | +--- (base class CDialog)
1&gt;   | | +--- (base class CWnd)
1&gt;   | | | +--- (base class CCmdTarget)
1&gt;   | | | | +--- (base class CObject)
1&gt;   0 | | | | | {vfptr}
1&gt;   | | | | +---
1&gt;   4 | | | | m_dwRef
1&gt;   8 | | | | m_pOuterUnknown
1&gt;  12 | | | | m_xInnerUnknown
1&gt;  16 | | | | XDispatch m_xDispatch
1&gt;  20 | | | | m_bResultExpected
1&gt;  24 | | | | XConnPtContainer m_xConnPtContainer
1&gt;  28 | | | | m_pModuleState
1&gt;   | | | +---
1&gt;  32 | | | m_hWnd
1&gt;  36 | | | m_bEnableActiveAccessibility
1&gt;     | | | &lt;alignment member&gt; (size=3)
1&gt;  40 | | | m_pStdObject
1&gt;  44 | | | m_pProxy
1&gt;  48 | | | XAccessible m_xAccessible
1&gt;  52 | | | XAccessibleServer m_xAccessibleServer
1&gt;  56 | | | m_bIsTouchWindowRegistered
1&gt;  60 | | | CPoint m_ptGestureFrom
1&gt;  68 | | | m_ulGestureArg
1&gt;  76 | | | m_bGestureInited
1&gt;  80 | | | m_pCurrentGestureInfo
1&gt;  84 | | | m_hWndOwner
1&gt;  88 | | | m_nFlags
1&gt;  92 | | | m_pfnSuper
1&gt;  96 | | | m_nModalResult
1&gt;  100 | | | m_pDropTarget
1&gt;  104 | | | m_pCtrlCont
1&gt;  108 | | | m_pCtrlSite
1&gt;  112 | | | m_pMFCCtrlContainer
1&gt;   | | +---
1&gt;  116 | | m_nIDHelp
1&gt;  120 | | m_lpszTemplateName
1&gt;  124 | | m_hDialogTemplate
1&gt;  128 | | m_lpDialogTemplate
1&gt;  132 | | m_lpDialogInit
1&gt;  136 | | m_pParentWnd
1&gt;  140 | | m_hWndTop
1&gt;  144 | | m_pOccDialogInfo
1&gt;   | +---
1&gt;  148 | m_hBkgrBitmap
1&gt;  152 | CSize m_sizeBkgrBitmap
1&gt;  160 | CBrush m_brBkgr
1&gt;  168 | BackgroundLocation m_BkgrLocation
1&gt;  172 | CDialogImpl m_Impl
1&gt;  180 | m_bAutoDestroyBmp
1&gt;   +---
1&gt; 
1&gt;  CDialogEx::$vftable@:
1&gt;   | &amp;CDialogEx_meta
1&gt;   |  0
1&gt;   0 | &amp;CDialogEx::GetRuntimeClass
1&gt;   1 | &amp;CDialogEx::{dtor}
1&gt;   2 | &amp;CObject::Serialize
1&gt;   3 | &amp;CDialog::AssertValid
1&gt;   4 | &amp;CDialog::Dump
1&gt;   5 | &amp;CDialog::OnCmdMsg
1&gt;   6 | &amp;CWnd::OnFinalRelease
1&gt;   7 | &amp;CCmdTarget::IsInvokeAllowed
1&gt;   8 | &amp;CCmdTarget::GetDispatchIID
1&gt;   9 | &amp;CCmdTarget::GetTypeInfoCount
1&gt;  10 | &amp;CCmdTarget::GetTypeLibCache
1&gt;  11 | &amp;CCmdTarget::GetTypeLib
1&gt;  12 | &amp;CDialogEx::GetMessageMap
1&gt;  13 | &amp;CCmdTarget::GetCommandMap
1&gt;  14 | &amp;CCmdTarget::GetDispatchMap
1&gt;  15 | &amp;CCmdTarget::GetConnectionMap
1&gt;  16 | &amp;CWnd::GetInterfaceMap
1&gt;  17 | &amp;CCmdTarget::GetEventSinkMap
1&gt;  18 | &amp;CCmdTarget::OnCreateAggregates
1&gt;  19 | &amp;CCmdTarget::GetInterfaceHook
1&gt;  20 | &amp;CCmdTarget::GetExtraConnectionPoints
1&gt;  21 | &amp;CCmdTarget::GetConnectionHook
1&gt;  22 | &amp;CWnd::PreSubclassWindow
1&gt;  23 | &amp;CWnd::Create
1&gt;  24 | &amp;CWnd::CreateEx
1&gt;  25 | &amp;CWnd::CreateEx
1&gt;  26 | &amp;CWnd::DestroyWindow
1&gt;  27 | &amp;CWnd::PreCreateWindow
1&gt;  28 | &amp;CWnd::CalcWindowRect
1&gt;  29 | &amp;CWnd::GetMenu
1&gt;  30 | &amp;CWnd::SetMenu
1&gt;  31 | &amp;CWnd::OnToolHitTest
1&gt;  32 | &amp;CWnd::GetScrollBarCtrl
1&gt;  33 | &amp;CWnd::WinHelpW
1&gt;  34 | &amp;CWnd::HtmlHelpW
1&gt;  35 | &amp;CWnd::WinHelpInternal
1&gt;  36 | &amp;CWnd::ContinueModal
1&gt;  37 | &amp;CWnd::EndModalLoop
1&gt;  38 | &amp;CWnd::OnDrawIconicThumbnailOrLivePreview
1&gt;  39 | &amp;CWnd::EnsureStdObj
1&gt;  40 | &amp;CWnd::get_accParent
1&gt;  41 | &amp;CWnd::get_accChildCount
1&gt;  42 | &amp;CWnd::get_accChild
1&gt;  43 | &amp;CWnd::get_accName
1&gt;  44 | &amp;CWnd::get_accValue
1&gt;  45 | &amp;CWnd::get_accDescription
1&gt;  46 | &amp;CWnd::get_accRole
1&gt;  47 | &amp;CWnd::get_accState
1&gt;  48 | &amp;CWnd::get_accHelp
1&gt;  49 | &amp;CWnd::get_accHelpTopic
1&gt;  50 | &amp;CWnd::get_accKeyboardShortcut
1&gt;  51 | &amp;CWnd::get_accFocus
1&gt;  52 | &amp;CWnd::get_accSelection
1&gt;  53 | &amp;CWnd::get_accDefaultAction
1&gt;  54 | &amp;CWnd::accSelect
1&gt;  55 | &amp;CWnd::accLocation
1&gt;  56 | &amp;CWnd::accNavigate
1&gt;  57 | &amp;CWnd::accHitTest
1&gt;  58 | &amp;CWnd::accDoDefaultAction
1&gt;  59 | &amp;CWnd::put_accName
1&gt;  60 | &amp;CWnd::put_accValue
1&gt;  61 | &amp;CWnd::SetProxy
1&gt;  62 | &amp;CWnd::CreateAccessibleProxy
1&gt;  63 | &amp;CDialogEx::OnCommand
1&gt;  64 | &amp;CWnd::OnNotify
1&gt;  65 | &amp;CWnd::GetSuperWndProcAddr
1&gt;  66 | &amp;CWnd::DoDataExchange
1&gt;  67 | &amp;CWnd::BeginModalState
1&gt;  68 | &amp;CWnd::EndModalState
1&gt;  69 | &amp;CDialogEx::PreTranslateMessage
1&gt;  70 | &amp;CWnd::OnAmbientProperty
1&gt;  71 | &amp;CWnd::WindowProc
1&gt;  72 | &amp;CWnd::OnWndMsg
1&gt;  73 | &amp;CWnd::DefWindowProcW
1&gt;  74 | &amp;CWnd::PostNcDestroy
1&gt;  75 | &amp;CWnd::OnChildNotify
1&gt;  76 | &amp;CWnd::OnTouchInputs
1&gt;  77 | &amp;CWnd::OnTouchInput
1&gt;  78 | &amp;CWnd::GetGestureStatus
1&gt;  79 | &amp;CWnd::OnGestureZoom
1&gt;  80 | &amp;CWnd::OnGesturePan
1&gt;  81 | &amp;CWnd::OnGestureRotate
1&gt;  82 | &amp;CWnd::OnGestureTwoFingerTap
1&gt;  83 | &amp;CWnd::OnGesturePressAndTap
1&gt;  84 | &amp;CDialog::CheckAutoCenter
1&gt;  85 | &amp;CWnd::IsFrameWnd
1&gt;  86 | &amp;CWnd::CreateControlContainer
1&gt;  87 | &amp;CWnd::CreateControlSite
1&gt;  88 | &amp;CDialog::SetOccDialogInfo
1&gt;  89 | &amp;CDialog::GetOccDialogInfo
1&gt;  90 | &amp;CDialog::Create
1&gt;  91 | &amp;CDialog::Create
1&gt;  92 | &amp;CDialog::CreateIndirect
1&gt;  93 | &amp;CDialog::CreateIndirect
1&gt;  94 | &amp;CDialog::DoModal
1&gt;  95 | &amp;CDialog::OnInitDialog
1&gt;  96 | &amp;CDialog::OnSetFont
1&gt;  97 | &amp;CDialog::OnOK
1&gt;  98 | &amp;CDialog::OnCancel
1&gt;  99 | &amp;CDialog::PreInitDialog
1&gt; 
1&gt;  CDialogEx::GetRuntimeClass this adjustor: 0
1&gt;  CDialogEx::PreTranslateMessage this adjustor: 0
1&gt;  CDialogEx::OnCommand this adjustor: 0
1&gt;  CDialogEx::GetMessageMap this adjustor: 0
1&gt;  CDialogEx::{dtor} this adjustor: 0
1&gt;  CDialogEx::__delDtor this adjustor: 0
1&gt;  CDialogEx::__vecDelDtor this adjustor: 0
1&gt; 
1&gt; 
1&gt;  class CDialogTemplate size(12):
1&gt;   +---
1&gt;   0 | m_hTemplate
1&gt;   4 | m_dwTemplateSize
1&gt;   8 | m_bSystemFont
1&gt;   +---
1&gt; 
1&gt; 
1&gt; 
1&gt;  MFCTestDlg.cpp
1&gt;  MFCTest.cpp
1&gt;  Generating Code...
1&gt;  MFCTest.vcxproj -&gt; C:\MFCTraining\MFCTest\Debug\MFCTest.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========</pre>
<p>Hope this helps you have a better understanding of how classes are laid out by the Visual C++ compiler.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fntcoder.com%2Fbab%2F2011%2F11%2F15%2Fhidden-vc-compiler-switches-d1reportsingleclasslayoutsometype%2F&amp;title=Hidden%20VC%2B%2B%20compiler%20switches%3A%20%2Fd1reportSingleClassLayoutSomeType" id="wpa2a_20"><img src="http://ntcoder.com/bab/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://ntcoder.com/bab/2011/11/15/hidden-vc-compiler-switches-d1reportsingleclasslayoutsometype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

