<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Li Xiong</title><link>http://blogs.msdn.com/lixiong/default.aspx</link><description /><dc:language>zh-CHS</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>MSAA, UIA brief explanation</title><link>http://blogs.msdn.com/lixiong/archive/2009/03/28/msaa-uia-brief-explanation.aspx</link><pubDate>Sat, 28 Mar 2009 14:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9516013</guid><dc:creator>lixiong</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/9516013.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=9516013</wfw:commentRss><description>&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;MSAA, UIA brief explanation&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"&gt;中文链接&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman"&gt;:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://eparg.spaces.live.com/blog/cns!59BFC22C0E7E1A76!4008.entry"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://eparg.spaces.live.com/blog/cns!59BFC22C0E7E1A76!4008.entry&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;What is MSAA:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms971310.aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/ms971310.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;MSAA is the same as IAccessible Interface.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The interface is originally designed for disabled people. While in most cases, it is used as an implementation method of UI Automation. However, this interface is not rich enough to fit into all aspects of UI Automation, as it only provides the name, type, positions of the target elements. It does not expose other functions like ClassName, Orientation, nor the operation supports like Window Move, Selection, to say nothing of Event Support.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;As a result, Microsoft believes there is a good reason to provide dedicated interfaces for UI Automations:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;IAccessibleEx&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;IRawElementProviderSimple:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd561900(VS.85).aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/dd561900(VS.85).aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;In MSDN category, the two interfaces belong to Windows Automation API, not MSAA.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The first interface IAccessibleEx, sounds like MSAA’s IAccessible, but it is just a proxy for the Automation Client to obtain the IRawElementProviderSimple. The implementation of pattern and property are in IRawElementProviderSimple. IAccessibleEx lives for only two reasons:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt" class=MsoNormal&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Provide the MSAA client a familiar way to use the new UI Automation API. The MSAA client is able to query for IAccessibleEx interface and consume the new feature without using the new style of UIA API. The client code can still work in COM style.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt" class=MsoNormal&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Provide the UI control programmer the MSAA way to implement and expose new UI Automation feature for the control. The programmer just needs to implement the IAccessibleEx interface for the control in COM style, and the pattern and property UI Automation features are accessible from new UIA APIs.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd561882(VS.85).aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/dd561882(VS.85).aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;IAccessibleEx is just a bridge. In Win7, the implementation for the bridge is in UIAutomationCore.dll.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;To use UI Automation, the client could choose to use UIA API directly, or, use the old style, which is obtaining IAccessible, and QueryService (not QueryInterface because the system needs to do some hook) for IAccessibleEx, and then just use it or continue to query for IRawElementProviderSimple.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;After getting the IRawElementProviderSimple, it is very easy to consume the patterns and providers:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms746691.aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/ms746691.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;Please note, the AutomationProvider could be implemented in either UI Server or the Client side. To implement in UI Server, the control could derive from IRawElementProviderSimple and return the client request like this:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: Verdana; FONT-SIZE: 9.5pt" lang=EN-US&gt;&lt;SPAN style="COLOR: #444444"&gt;if ((m.Msg == WM_GETOBJECT) &amp;amp;&amp;amp; (m.LParam.ToInt32() ==&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutomationInteropProvider.RootObjectId))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.Result = &lt;STRONG&gt;&lt;SPAN style="FONT-FAMILY: Verdana"&gt;AutomationInteropProvider.ReturnRawElementProvider&lt;/SPAN&gt;&lt;/STRONG&gt;(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Handle, m.WParam, m.LParam,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IRawElementProviderSimple)this);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The client implementation benefits the old Win32 control as we do not need to modify any existing implementations for the control. For client side provider, it is also called as Provider/Automaton Proxy. In client implementation, the ProviderOptions property should return ProviderOptions.ClientSideProvider.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;For Win32 and WinForm default implementations, they are in client side. The assembly is UIAutomationClientSIdeProvider.DLL. The ProxyHwnd.GetElementProperty’s implementation is very typical:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;Getting UIAotmationID by sending WM_GETCONTROLNAME message&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;Getting Name property by reading MSAA’s Name property first, calling GetWindowLong and GetWindowText API the second and trying PostMessage for last.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;I just found an old Automation Paper created in 2004:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms996405.aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/ms996405.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The author Brian McMaster, who is a Test Architect now, educated people to use WM_GETCONTROLNAME message to get control ID, take care of the hierarchy of UI control, and watch out for the case that window owner and window parent are different, in the year when UIA was absence.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;With above understanding, it is quite easy to implement the server side for WinForm:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt" class=MsoNormal&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Override WndProc by calling AutomationInteropProvider.ReturnRawElementProvider to return WM_GETOBJECT message.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt" class=MsoNormal&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Implement IRawElementProviderSimple and return ProviderOptions.ServerSideProvider.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt" class=MsoNormal&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Implement the providers like ISelectionProvider.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The full code is available in the links above.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;For UIAutomation client, besides the IAccessibleEx I talked above, there are two kinds of UIAutomation API, managed and unmanaged.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The managed API is in System.Windows.Automation namespace. The class name is AutomationElement. The functions are very direct to use.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The unmanaged API is a group of functions whose name starts with UIA.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;In current design, the managed API uses unmanaged API internally, while the provider used in the unmanaged API are implemented in managed code. The relationship is a bit complex. And there are some features work fine in unmanaged API but may fail in managed API because of bug. In Win8, we may merge the implementation to reduce the maintenance cost.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The user is not allowed to add (extend) new property and pattern in UIA. You cannot register your new pattern provider or property. You cannot even use the functions from the interface directly:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.windows.automation.provider.automationinteropprovider.hostproviderfromhandle.aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/system.windows.automation.provider.automationinteropprovider.hostproviderfromhandle.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;"The interface returned by this method can only be passed back to UI Automation. Attempting to call a method on the interface will raise an exception"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;If you really want to do it, follow the steps to get IAccessibleEx, and do your own QueryInterface.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;Above explanation is for Win32 and WinForm. For WPF, it uses AutomationPeer to implement UIAutomation.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The communication between client and server for native UIAutomation implementation (AutomationPeer and ReturnRawElementProvider) is named pipe. The client provider with MSAA is by DCOM and Windows Message.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;Additional links:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;UI Automation Community Promise Specification&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=A1FE1066-BF4F-44FC-834B-676B311E83A2&amp;amp;displaylang=en"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=A1FE1066-BF4F-44FC-834B-676B311E83A2&amp;amp;displaylang=en&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;UI Automation of a WPF Custom Control&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc165614.aspx"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://msdn.microsoft.com/en-us/library/cc165614.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3 face="Times New Roman"&gt;The followings two docs are created by Microsoft, but I cannot find the link from MSDN. They explains UIA’s design goal, IAccessibleEx and IRawElementProviderSimple’s relationships very well.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT size=3 face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.accessinteropalliance.org/docs/Introducing_IAccessibleEx.doc"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://www.accessinteropalliance.org/docs/Introducing_IAccessibleEx.doc&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.accessinteropalliance.org/docs/What_is_UIAutomation.doc"&gt;&lt;FONT size=3 face="Times New Roman"&gt;http://www.accessinteropalliance.org/docs/What_is_UIAutomation.doc&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9516013" width="1" height="1"&gt;</description></item><item><title>Section 3: UI Automation execution covers test hole which normal test cannot</title><link>http://blogs.msdn.com/lixiong/archive/2008/11/07/section-3-ui-automation-execution-covers-test-hole-which-normal-test-cannot.aspx</link><pubDate>Thu, 06 Nov 2008 17:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9049920</guid><dc:creator>lixiong</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/9049920.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=9049920</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Section 3: UI Automation execution covers test hole which normal test cannot&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;In previous sections, I discussed the UI Automation preparation and development. I want to deliver the message that UI Automation is not test repeating happens automatically. It is unique. UI Automation execution does not only compensate human flaw and costs, but also cover the test path that other testing cannot.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;The benefits of UI Automation are obvious. Testers do not need to repeat the boring tasks. Regressions are found earlier. No human mistakes and the test results are accountable. It is cool but not limited above.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;There are bugs that can be easily found by Automation, but difficult by manual&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;U&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Real case one:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Our project is WPF based. The feature is something like Window explorer. It contains the address bar and when the user inputs the path, the application loads the data from that path.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 3.75pt; TEXT-INDENT: -3.75pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: -.5" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;We have a test case to start the application, type some path, and check the data loaded. In manual testing, it is perfect. It works every time. We developed the Automation case to perform the same flow. The Automation crashes the target application when it executes the first time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 3.75pt; TEXT-INDENT: -3.75pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: -.5" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 3.75pt; TEXT-INDENT: -3.75pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: -.5" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;The root cause is about threading. When the application starts, it creates a worker thread to perform some initialization task. In manual testing, as the user type speed is not so fast, the worker thread exists safely before the application starts the data loading from the path. UI Automation makes the whole execution pretty fast. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;The application starts to load the data before the worker thread exists, so the initialization does not complete and leads to data corruption with crashe. When the root cause is identified, we start the application and paste the path to load instead of type, and the crashes happens manually.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 3.75pt; TEXT-INDENT: -3.75pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: -.5" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 3.75pt; TEXT-INDENT: -3.75pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: -.5" align=left&gt;&lt;U&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Real case two:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;In our UI Automation, we wrap the Automation task in test helper classes. We have create, delete, rename, move, add group, lock/unlock and other tasks. With Automation, we can easily generate flows to execute these tasks, with specified pattern or total random.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;The auto generated test flow find two special bugs. It generates a random test case like &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;a) Create userA&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;b) Add userA groupB&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;c) Add userA groupB&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;d) Add userA groupB&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;The test execution fails at step d)! The problem only happens when you try to perform the same add group task the 3&lt;SUP&gt;rd&lt;/SUP&gt; time! The root cause is, adding user to the same group more than once leads error. The error flag is not handled correctly in step c), thus the problem happens in step d).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;In manual testing, 99.99% tester stops at step c). Nobody will test by “adding to the same group” once, once again, and again and again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Another similar issue is, object move task works fine in 99% cases, except move the object from current location to grand parent.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Add an example from One Note team:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;A href="http://blogs.msdn.com/johnguin/archive/2008/09/08/investigating-an-automation-failure.aspx"&gt;http://blogs.msdn.com/johnguin/archive/2008/09/08/investigating-an-automation-failure.aspx&lt;/A&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;The UI Automation execution pattern is different from human. It is unique at detecting threading issue, randomization and strange combinations.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;There are test path and coverage can be easily reached by Automation, but difficult by manual&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;We have a test pass to measure the memory usage by running daily task for the UI application 24*7. Are you going to hire a monkey?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Stress testing is a typical example for test path which can only be covered by Automation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Another real case is permutation. Our application is designed to handle different types of object. However, it is difficult to predict that all the types are known for us. The only way is to go through every folder and sub folder, to load every objects in the whole organization. With Automation, it is very simple to do it recursively. Eventually, we find a bug which corrupts the whole navigation feature. We made an incorrect assumption that the indicator between child and parent in path goes with a static pattern. It turns out the pattern is configurable. I cannot image if the product gets shipped with this kind of bug.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;Summary:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"&gt;I skip other obvious benefits Automation can bring. If the three topics give a clear definition of what UI Automation is, what it brings and what you need to prepare, it is unnecessary to discuss when to apply manual and when to use automation. Triage by yourself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9049920" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/lixiong/archive/tags/Test/default.aspx">Test</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/UI/default.aspx">UI</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/Automation/default.aspx">Automation</category></item><item><title>Section 2: UI Automation development is an important, unique, and effective bug finding process</title><link>http://blogs.msdn.com/lixiong/archive/2008/11/06/section-2-ui-automation-development-is-an-important-unique-and-effective-bug-finding-process.aspx</link><pubDate>Wed, 05 Nov 2008 18:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9044924</guid><dc:creator>lixiong</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/9044924.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=9044924</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Section 2: UI Automation development is an important, unique, and effective bug finding process&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;If you think UI Automation is no more than repeating the manual testing automatically, you are completely wrong. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Many people expect to record the manual testing, and reply. They think tester just designs the test case once, records it once, then all the boring repeating jobs are auto! They try all the best to get there and they believe reducing cost is the only benefit Automation can bring. No, they are wrong. First of all, please check my previous post. This kind of recording/reply Automation is not a good Automation. It is not flexible. It cannot handle various inputs to verify. It cannot suit when resolution or window starting position changes. This kind of UI Automation is a typical failure. If your assumption on UI Automation is above, UI Automation will definitely hurt you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;In this post and the next, I will continue to discuss the meaning of UI Automation. I will focus on UIAutomation development here. Next I will focus on execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;UI Automation development (before executing) is a unique bug finding process. It is NOT a combination of any existing testing mechanism plus automation. It is NOT derived from manual testing. It is unique, high effective and great coverage test mechanism which can compensate all the other existing test methodologies.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Accessibility and localization bugs are exposed naturally when developing the UI Automation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;The first step for any UI Automation is to access the target UI elements. The tester needs to find a proper way to probe, identify the target UI element, and then read the information from UI to verify. If the tester cannot find AutomationID, AutomationName, and shortcut key to execute UI task, bugs are found! Most of the accessibility issues are exposed naturally in this stage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;A good UI Automation should work well for localized build. The tester needs to write code to work with product resource file and resource key. If some string is hard coded in product, the bug is also exposed naturally.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Actually, Accessibility is very serous for Microsoft products. If an Automation name is not well defined, it is a S2 bug, the same as major function break. In early stage, our dev team did not know UI Accessibility requirements very well. The test team could help a lot in this stage to prevent hundreds of S1/S2 bugs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;The tester needs to solve the same problem as developer does. More people working on the same problem means more coverage. (This is not limited in UI Automation. It applies to all kinds of Automation tests)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;In manual test, the tester starts the UI and plays with it. Most of the functions are visible and the tester will be influenced by the UI. The tester will try different patterns and different data to break it. Probably the tester will pre-define the test cases. However, these cases are usually based on scenarios, patterns, boundaries and other test metric.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;It is great. It is important and valid test scenarios. We should continue to invest and apply these tests. However, UI Automation development brings another test strategy which compensates a lot.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;In the manual tests, or for the pre-defined test cases, the think pattern is usually: &lt;B style="mso-bidi-font-weight: normal"&gt;can the product meet this kind of corner requirement&lt;/B&gt;? UI Automation development brings another think pattern: &lt;B style="mso-bidi-font-weight: normal"&gt;how can the problem be solved and all the requirements be met correctly&lt;/B&gt;?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;To make a good and flexible UI Automation case, the tester cannot rely on static input/output. The tester has to solve the same problem just as the developer does. When the tester starts to work on the solution, the tester faces the same set of issues the developer needs to handle with. It includes the corner cases, exception/error handing and assumptions. It makes the tester understand the problem well, to really think about what a good solution can be. It helps test coverage because the tester is suffered with the same problem, and it also kills invalid test cases. In this process, the tester may want to proactively review product code, so it leads to more benefits:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo2; tab-stops: list 21.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"&gt;&lt;SPAN style="mso-list: Ignore"&gt;l&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Effective code review and design review with specified goal in mind. It is the most effective way to find bugs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo2; tab-stops: list 21.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"&gt;&lt;SPAN style="mso-list: Ignore"&gt;l&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Complex measurement like performance can be easily covered in early stage from review.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo2; tab-stops: list 21.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"&gt;&lt;SPAN style="mso-list: Ignore"&gt;l&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;It helps the communication between dev and test&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Put notepad as an example. Notepad reorganizes ANSI/UNICODE/UTF8/UTF16 formats automatically. UI Automation for this case should operate notepad to open different kinds of file, and check the string showing in the window. How could the test know the expected string? The tester has to write the code to reorganize formats just like the notepad.exe does. (Of course you can generate string first, and save to different formats. But you know what I mean)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Microsoft defines a special field in bug database to identify how bug is found. “Automation development” is a very frequently used value for me.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;The tester has to triage the severity for UI Automation test tasks. It makes the important features tested first.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You can play around for everywhere in manual testing. However, you do not have the resources to create Automation to cover all the features. You have to put important thing first when creating the Automation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Managers may like this. Manager cares about the priority and severity. They can bear tons of S3/S4 bugs but they hate surprise in major functions. However, testers trend to show how strong they are to find corner issue no matter how corner it is!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;With UI Automation, the manager can assign challenging tasks for ICs. ICs are happy to take the challenging and interesting tasks. Manager is happy because testing goes with severity. ICs are happy because they are finding bugs in a challenging and effective way!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;In previous post, I discussed the meaning of being able to create UI Automation before start. In this post, you see the meaning of creating UI Automation before executing. UI Automation can give you so many even before it starts.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9044924" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/lixiong/archive/tags/Test/default.aspx">Test</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/UI/default.aspx">UI</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/Automation/default.aspx">Automation</category></item><item><title>Section 1:  UI Automation means more to get a test result</title><link>http://blogs.msdn.com/lixiong/archive/2008/11/04/ui-automation.aspx</link><pubDate>Tue, 04 Nov 2008 15:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9039723</guid><dc:creator>lixiong</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/9039723.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=9039723</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;My understanding of UI Automation&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Section 1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;UI Automation means more to get a test result&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Section 2:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;UI Automation development is an important, unique, and effective bug finding process&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Section 3:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;UI Automation execution covers test hole which normal test cannot cover&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;STRONG&gt;Section 1: UI Automation means more to get a test result&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;UI Automation is an interesting topic. Before discussing the complexity, benefits, coverage, test holes, maintenances costs and other controversial factors involved in UI Automation, the meaning when a tester can create a successful UIAutomation case is somewhat different.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;How UI Automation works? How the textbox gets filled, button gets clicked and window gets opened and closed automatically. It seems quite a magic but a successful UIAutomation is not limited on just making it work. Successful UIAutomation means at least but not limited:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Stable. A succeed case should always succeed no matter it executes in a powerful x64 machine, or a slow x86 VM. It should give the same result when the initial window position changes. It can test localized build.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Performant. UIAutomation should runs faster than manual execution because it is controlled by machine! It is very bad if the test sleeps for a specified time between each UI operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;3.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Flexible. The input and expected output should be configurable. If the test executes against large input, it should still generate the same pass/fail result. The execution time should be liner.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Given a Visual Studio 2008, how can you create such an UI Automation case to open notepad, type ABC, click file -&amp;gt; save menu, and type a filename in the dialog?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;If you do not know Windows Message quite well, the most direct way is to use SendInput to simulate keyboard/mouse input. It works but the problem is:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You have to calculate the Window position. The initial window position changes and different resolution/DPI settings will be a nightmare.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You have to Sleep between each SendInput. For notepad, there is a timeframe between clicking File menu item and showing the sub menu. If test case does not wait, the clicking on save menu may be missed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Window Message is a silver bullet? It works for most of the time, but the new problem is more difficult to solve:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;If the target application is .NET WinForm, the HWND tree may change at runtime. If you hide a tree control, and show it, the Win32 HWND for the tree control is likely to change. WinForm also creates some transparent HWND child which may break the Automation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;There are a lot of traps to work with Windows Message. Suppose you want to set focus on the textbox of the target application, just calling SetFocus and passing the textbox HWND? No, please read:&lt;BR&gt;&lt;BR&gt;"The SetFocus function sets the keyboard focus to the specified window. The window must be attached to the calling thread's message queue."&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms646312(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms646312(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms646312(VS.85).aspx&lt;/A&gt;&lt;BR&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;3.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;The SendMessage API returns only when the target application finishes the handling. However, it does not solve the sync issue between tester app and testee app completely.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;4.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;What if the target application is WPF based??????!!!!!!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Let me stop showing how difficult it is. (It is indeed very difficult). Microsoft combines SendInput, Windows Message and the Accessibility support for UI element to create internal UI Automation tests.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;For who do not know Accessibility support, please check:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms696165.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms696165.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms696165.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Generally speaking, UIAutomation is just an inter-process communication. Like every other normal application, inter-process means:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;How and where the communication happens? Windows Message, Socket, RPC, Named Pipe, Memory mapping file, WCF or even DLL Injection? (I will talk WCF and DLL Injection for UIAutomation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Synchronization. How the test client knows a UI instruction finishes on target side, so that it can send the next instruction? How the test client distinguishes an initialization window and an initialized window so that it will block the button clicking before the button gets visible?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;I can talk more on details later. This is how our UI Automation Framework makes it (at least but not limited):&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18.6pt; TEXT-INDENT: -18.6pt; tab-stops: list 18.6pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Most of the UI Automation is DCOM invocation. UI element exposes IAccessible COM interface. WPF UI element also supports it. Check the following for more info:&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms747327.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms747327.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms747327.aspx&lt;/A&gt;&lt;BR&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18.6pt; TEXT-INDENT: -18.6pt; tab-stops: list 18.6pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;SendInput, Windows Message and notification are widely used for special cases.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18.6pt; TEXT-INDENT: -18.6pt; tab-stops: list 18.6pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;3.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Window Hook and WinEvents are used to detect UI status change&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18.6pt; TEXT-INDENT: -18.6pt; tab-stops: list 18.6pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;4.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;WM_NULL, probing processor usage and thread condition of target application are used for synchronization.&lt;BR&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Even with the support of UI Automation Framework, creating good UI Automation case is still a skillful task. You need to know where to use raw device input API and where to leverage the COM invocation API. How you pickup the correct synchronization mechanism? How to probe the target UI element effectively, using index, ID, or name? Starting from the root desktop Window or from a parent window? What if the target application shows MessageBox whose parent is desktop not the application main window? What if the target application uses async way to creates dynamic UI?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;If you can design a scalable web application, it means you know programming language, threading locks, HTTP protocol, and probably database very well. If you can design a good UI Automation case, the meaning is not limited to the test result you can get. It means:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;1.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You know programming well, .NET Framework, multiple threading, C#...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;2.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You know Windows mechanism (Win32) well&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;3.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You probably know how COM/DCOM works. There is no mystery for you any more.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;4.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;You know how application fails and you know debugging well. (Debugging UI Automation is quite difficult than debugging your own EXE, and I promise the Automation will fail again and again before you know how to work it out)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana"&gt;5.&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; mso-fareast-font-family: Verdana"&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;At last, you know your test target well. Well, I will cover this in coming topics.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;When the testers are armed with above skill sets, it will be quite easy to break other’s application. And it will be a solid tech base for them to develop other skills. When you know how to make your UI Automation work, you know how a typical&amp;nbsp;developer works with code, how often&amp;nbsp;the assumpations&amp;nbsp;are incorrectly&amp;nbsp;made, and why application fails so that you know how to break it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;PS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;If you know &lt;A href="http://blois.us/Snoop/"&gt;WPF Snoop&lt;/A&gt;, you see how DLL Injection can work for UI Automation. In prototype stage of my current project, I tried to create a new Automation Engine combing with DllInject and WCF. I inject a DLL into WFP application, and the DLL hosts a WCF server inside that. It opens a door for me to execute arbitrary code on target process. Then I can use WPF TreeWalker and reflection to do what ever I want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9039723" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/lixiong/archive/tags/Test/default.aspx">Test</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/UI/default.aspx">UI</category><category domain="http://blogs.msdn.com/lixiong/archive/tags/Automation/default.aspx">Automation</category></item><item><title>The hierarchy in flat memory: Heap and Stack</title><link>http://blogs.msdn.com/lixiong/archive/2007/06/12/the-hierarchy-in-flat-memory-heap-and-stack.aspx</link><pubDate>Mon, 11 Jun 2007 15:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3231372</guid><dc:creator>lixiong</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/3231372.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=3231372</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 16pt"&gt;&lt;FONT face="Times New Roman"&gt;The hierarchy in flat memory: Heap and Stack&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;This section discusses Heap, related heap corruption/memory leak, and how to use pageheap to troubleshoot.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Heap is designed for efficiency use of the flat memory space&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In Chinese version, it discusses why we need heap, and how it is built on the top of flat memory management. Then I go through different scenarios in detail. Here I just brief some of the points, and put the time to discuss the real cases.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Due to the nature of the heap, it pains when we meet the following issues:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Heap use after free&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Heap use underflow and overflow&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Double free&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Multiple thread uses.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Pageheap is a OS built facility to enable debugging trace of heap manager. Please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How to use Pageheap.exe in Windows XP and Windows 2000&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/kb/286470/en-us"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/kb/286470/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Pageheap.exe download is available at:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;A href="http://www.heijoy.com/debugdoc/pageheap.zip"&gt;&lt;FONT face="Times New Roman"&gt;http://www.heijoy.com/debugdoc/pageheap.zip&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;A href="http://blogs.msdn.com/lixiong/attachment/2792912.ashx"&gt;&lt;FONT face="Times New Roman"&gt;http://blogs.msdn.com/lixiong/attachment/2792912.ashx&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;A good resource is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Debug Tutorial Part 3: The Heap&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;A href="http://www.codeproject.com/debug/cdbntsd3.asp"&gt;&lt;FONT face="Times New Roman"&gt;http://www.codeproject.com/debug/cdbntsd3.asp&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Look at the following code, compile it in release mode:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;char&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; *p=(&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;*)malloc(1024);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;p[1024]=1;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It overwrites 1 byte. In release mode, it does not crash. However, if we enable pageheap with the following command:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;C:\Debuggers\pageheap&amp;gt;pageheap /enable mytest.exe /full&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;C:\Debuggers\pageheap&amp;gt;pageheap&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;mytest.exe: page heap enabled with flags (full traces )&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Rerun it with pageheap enabled, the application crashes. However, if we change the code a little:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;char&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; *p=(&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;*)malloc(1023);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;p[1023]=1;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Does it crashes even the pageheap is enabled?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;It does not crashes even if pageheap is enabled with default setting. To debug such issue, we need to use /unaligned switch.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;A similar case is the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: silver; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;char *p=new char[1023];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: silver; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;p[-1]='c';&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;To debug it, we need to use /backwards switch.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Let’s perform other tests on above code. If we compile in debug mode, even with pageheap enabled, do them crash? Based on my test, they do not crash no matter what switch we use. Do you know why?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;It is due to CRT debug heap. The debug version of CRT allocates extra memory for trace use at the end of normal block. The extra 1 byte overwriting just occurs on the extra memory, thus the crashes does not happen. This is a case that debug version does not really help debug.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Another sample is double free. Let’s check the following code:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *p=(&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;*)malloc(1023);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;free(p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;free(p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Then try to test with the following conditions:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Disable pageheap, test debug build and release build.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Enable pageheap, test debug build and release build.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;You should observe different behaviors. What’s the reason?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="COLOR: silver"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;It is also due to debug CRT version. When CRT detects double free, it uses own way to report.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Besides heap corruption, another issue is heap fragmentation.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Heap fragmentation is often caused by one of the following two reasons&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;1. Small heap memory blocks that are leaked (allocated but never freed) over time&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;2. Mixing long lived small allocations with short lived long allocations&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Both of these reasons can prevent the NT heap manager from using free memory efficiently since they are spread as small fragments that cannot be used as a single large allocation&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For detailed info, please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The Windows XP Low Fragmentation Heap Algorithm Feature Is Available for Windows 2000&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=816542"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=816542&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For a vivid analysis, please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;.NET Memory usage - A restaurant analogy&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://blogs.msdn.com/tess/archive/2006/09/06/742568.aspx"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://blogs.msdn.com/tess/archive/2006/09/06/742568.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Another important use of pageheap is memory allocation trace. When enables trace function, heap manager records the callstack when heap operation occurs. It allows us to find out the recent callstacks of the heap operation when debugging heap issue. Look at the following sample:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;char&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; * getmem()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;[100];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;void&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; free1(&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *p)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;delete&lt;/SPAN&gt; p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;void&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; free2(&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *p)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;delete&lt;/SPAN&gt; [] p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; main(&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;*)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *c=getmem();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;free1(c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;free2(c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-para-margin-left: 2.0gd; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Enable pageheap with trace, run the application in windbg:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; g&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;===========================================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;VERIFIER STOP 00000007: pid 0x1324: block already freed &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;015B1000 : Heap handle&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003F&lt;/st1:chmetcnv&gt;5858 : Heap block&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;00000064 : Block size&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;00000000 : &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;===========================================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;(1324.538): Break instruction exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ion - code 80000003 (first chance)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;eax=00000000 ebx=015b1001 ecx=&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;81b863 edx=0012fa&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7f&lt;/st1:chmetcnv&gt; esi=00000064 edi=00000000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;eip=&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;822583 esp=0012fbe8 ebp=0012fbf4 iopl=0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;nv up ei pl nz na pe nc&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;cs=001b&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;ss=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;ds=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;es=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;fs=003b&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;gs=0000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;efl=00000202&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!DbgBreakPoint:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;7c&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;822583 cc&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;int&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With pageheap enabled, when heap manager detects issue, it triggers break point exception to stop the debugger. It also dumps detailed information in debugger such as block already freed. With kb command, we can list the callstack when the second free occurs:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; kb&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ChildEBP RetAddr&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Args to Child&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fbe4 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;85079b 015b1000 0012fc94 0012fc70 ntdll!DbgBreakPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fbf4 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;87204b 00000007 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="8722" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;8722f&lt;/st1:chmetcnv&gt;8 015b1000 ntdll!RtlpPageHeapStop+0x72&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fc70 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;873305 015b1000 00000004 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 ntdll!RtlpDphReportCorru&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;edBlock+0x11e&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fca0 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="8734" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;8734c&lt;/st1:chmetcnv&gt;3 015b1000 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;0000 01001002 ntdll!RtlpDphNormalHeapFree+0x32&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fcf8 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;8766b9 015b0000 01001002 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 ntdll!RtlpDebugPageHeapFree+0x146&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fd60 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;860386 015b0000 01001002 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 ntdll!RtlDebugFreeHeap+0x1ed&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fe38 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;81d77d 015b0000 01001002 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 ntdll!RtlFreeHeapSlowly+0x37&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012ff&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt; &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="78134" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;78134c&lt;/st1:chmetcnv&gt;3b 015b0000 01001002 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 ntdll!RtlFreeHeap+0x&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="11" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;11a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012ff68 &lt;SPAN style="COLOR: blue"&gt;00401016&lt;/SPAN&gt; &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN style="COLOR: red"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN style="COLOR: red"&gt;5858&lt;/SPAN&gt; &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 00000064 MSVCR80!free+0xcd&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012ff&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt; 00401198 00000001 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;57e8 &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;3628 win32!main+0x16 [d:\xiongli\today\win32\win32\win32.cpp @ 77]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012ffc0 77e523cd 00000000 00000000 7ffde000 win32!__tmainCRTStartup+0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="10" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;10f&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0012fff0 00000000 004012e1 00000000 78746341 kernel32!BaseProcessStart+0x23&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The return address is &lt;SPAN style="COLOR: blue"&gt;00401016&lt;/SPAN&gt; , thus Free occurs in the previous line of &lt;SPAN style="COLOR: blue"&gt;00401016&lt;/SPAN&gt; . The problematic heap address is &lt;SPAN style="COLOR: red"&gt;0x3f5858&lt;/SPAN&gt; , with !heap command, we can get the saved callstack of the recent heap operation:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; !heap -p -a 0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3f&lt;/st1:chmetcnv&gt;5858&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;address &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;003f&lt;/st1:chmetcnv&gt;5858 found in&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;_HEAP @ &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3f&lt;/st1:chmetcnv&gt;0000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;in HEAP_ENTRY: Size : Prev Flags - UserPtr UserSize - state&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3f&lt;/st1:chmetcnv&gt;5830: 0014 : N/A&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;[N/A] - &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3f&lt;/st1:chmetcnv&gt;5858 (70) - (free DelayedFree)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Trace: &lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="4" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;004f&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;860386 ntdll!RtlFreeHeapSlowly+0x00000037&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;81d77d ntdll!RtlFreeHeap+0x&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="11" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0000011a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="78134" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;78134c&lt;/st1:chmetcnv&gt;3b MSVCR80!free+0x000000cd&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;401010 win32!main+0x00000010&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;77e523cd kernel32!BaseProcessStart+0x00000023&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above saved callstack, at the previous line of 0x401010, a Free call already occurred. &lt;SPAN style="COLOR: blue"&gt;00401016 and 00401010&lt;/SPAN&gt; nears, let’s check what they are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; uf 00401010&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;win32!main [&lt;B style="mso-bidi-font-weight: normal"&gt;d:\xiongli\today\win32\win32\win32.cpp @ 74&lt;/B&gt;]:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;74 00401000 56&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;push&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;75 00401001 &lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="6" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;6a&lt;/st1:chmetcnv&gt;64&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;push&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0x64&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;75 00401003 e824000000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;call&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;win32!operator new[] (&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40102" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0040102c&lt;/st1:chmetcnv&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;75 00401008 8bf0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi,eax&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;76 &lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="40100" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0040100a&lt;/st1:chmetcnv&gt; 56&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;push&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;76 0040100b e828000000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;call&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;win32!operator delete (00401038)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;77 &lt;SPAN style="COLOR: blue"&gt;00401010&lt;/SPAN&gt; 56&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;push&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;77 00401011 e&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="81" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;81c&lt;/st1:chmetcnv&gt;000000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;call&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;win32!operator delete[] (00401032)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;77 &lt;SPAN style="COLOR: blue"&gt;00401016&lt;/SPAN&gt; &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="83" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;83c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;40c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;add&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esp,0xc&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;78 00401019 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="33" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;33c&lt;/st1:chmetcnv&gt;0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;xor&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,eax&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;78 0040101b 5e&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pop&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;79 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40101" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0040101c&lt;/st1:chmetcnv&gt; c3&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ret&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above information, the double free is due to a delete call and a delete[] call. The corresponding source is in line 74. We can also check the &lt;SPAN style="COLOR: red"&gt;0x3f5858&lt;/SPAN&gt; address:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; dd &lt;SPAN style="COLOR: red"&gt;0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3f&lt;/st1:chmetcnv&gt;5848&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5848&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="88" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;88c&lt;/st1:chmetcnv&gt;580 &lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="25" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0025a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;5f&lt;/st1:chmetcnv&gt;0 &lt;SPAN style="COLOR: #ff6600"&gt;00412920&lt;/SPAN&gt; &lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="COLOR: red"&gt;dcba&lt;/SPAN&gt;&lt;/B&gt;aaa9&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5858" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5858&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5868" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5868&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5878" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5878&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5888" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5888&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5898" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;5898&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="58" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;58a&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="8" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;8&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0 f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;003f&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;58b&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="8" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;8&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;0 a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;0 a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;0 00000000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Here the dcba is a flag. The address before the flag is used to save the callstack:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:000&amp;gt; dds &lt;SPAN style="COLOR: #ff6600"&gt;00412920&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #ff6600; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412920 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;00000000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412924&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00000001&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412928&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="5004" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0005004f&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="41292" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0041292c&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;860386 ntdll!RtlFreeHeapSlowly+0x37&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412930&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="7" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;7c&lt;/st1:chmetcnv&gt;81d77d ntdll!RtlFreeHeap+0x&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="11" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;11a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412934&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="78134" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;78134c&lt;/st1:chmetcnv&gt;3b MSVCR80!free+0xcd&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00412938&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;00401010&lt;/SPAN&gt; win32!main+0x10&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="41293" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0041293c&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77e523cd kernel32!BaseProcessStart+0x23&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;This flag is useful for troubleshoot memory leak. The leaked memory is usually allocated in the same place. When there are a lot of leaked memories, there should be a lot of leaked heap pointers. Since every heap pointer contains the flag, by searching the flag, we can get corresponding callstack. If some callstack occurs frequently, usually the callstack is related to the leaked memory. The real case is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Why out of memory when only 300MB memory is allocated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The malloc call fails in customer application when total memory occupation is only 300MB. By checking the dump file, the issue is caused by heap fragmentation.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;After enabling pageheap and captured the dump again, I used the following command to search dcba flag:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:044&amp;gt; s -w &lt;st1:chmetcnv w:st="on" UnitName="l" SourceValue="0" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;0 L&lt;/st1:chmetcnv&gt;?60030000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0xdcba&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;00115e9e&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba 0000 0000 ef98 0012 893d 0047 efc8&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;..........=.G...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;19b90fe6&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba cfe8 02d8 afe8 2ca3 cfe8 02d8 b&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="22" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;22a&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;.........,....*.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;19b92fe6&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba cfe8 &lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1a&lt;/st1:chmetcnv&gt;52 8fe8 1dff cfe8 1af&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="6" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;6 f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="44" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;44f&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;....R.........O.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;19b9cfce&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba efd0 23d8 cfd0 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;58 8fd0 &lt;st1:chmetcnv w:st="on" UnitName="ac" SourceValue="15" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;15ac&lt;/st1:chmetcnv&gt; c&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;.....#..X.......&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;2b06efe6&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba cfe8 02d8 8fe8 258b cfe8 02d&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="8" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;8 a&lt;/st1:chmetcnv&gt;6d2&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;.........%......&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;2b074fce&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba 2fd0 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0f&lt;/st1:chmetcnv&gt; afd0 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;4d dfd0 0e&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="69" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;69 c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;.../....M...i...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;2e860fe6&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba afe8 02d8 2fe8 2ef3 afe8 02d8 &lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0a&lt;/st1:chmetcnv&gt;0b&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;......./........&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;2e868fce&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;dcba afd0 0881 2fd0 2e92 afd0 &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="881" HasSpace="True" Negative="False" NumberType="1" TCSC="0"&gt;0881 c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;......./........&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on the search result, I use the following command to print the callstack randomly:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:044&amp;gt; dds poi(19b92fe6&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;-6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;005cbe90&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba10&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="31" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;00031c&lt;/st1:chmetcnv&gt;49&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba14&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00122ddb&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba18&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77fa8468 ntdll!RtlpDebugPageHeapAllocate+0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="2" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;2f&lt;/st1:chmetcnv&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77faa&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="27" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;27a&lt;/st1:chmetcnv&gt; ntdll!RtlDebugAllocateHeap+0x2d&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba20&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;60e22 ntdll!RtlAllocateHeapSlowly+0x41&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba24&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="46" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;46f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="5" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;5c&lt;/st1:chmetcnv&gt; ntdll!RtlAllocateHeap+0xe&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba28 &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;0046b404 Customer_App+0x6b404&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="2" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;2c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;0046b426 Customer_App+0x6b426&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba30&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00427612 Customer_App+0x27612&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:044&amp;gt; dds poi(19b9cfce&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;-6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;005cbe90&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba10&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="31" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;00031c&lt;/st1:chmetcnv&gt;49&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba14&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00122ddb&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba18&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77fa8468 ntdll!RtlpDebugPageHeapAllocate+0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="2" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;2f&lt;/st1:chmetcnv&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77faa&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="27" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;27a&lt;/st1:chmetcnv&gt; ntdll!RtlDebugAllocateHeap+0x2d&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba20&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;60e22 ntdll!RtlAllocateHeapSlowly+0x41&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba24&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="46" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;46f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="5" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;5c&lt;/st1:chmetcnv&gt; ntdll!RtlAllocateHeap+0xe&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005b8024&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;0046b404 Customer_App+0x6b404&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005b8028&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;0046b426 Customer_App+0x6b426&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005b&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="802" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;802c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="427" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;00427a&lt;/st1:chmetcnv&gt;82 Customer_App+0x&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="27" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;27a&lt;/st1:chmetcnv&gt;82&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;0:044&amp;gt; dds poi(2b06efe6&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;-6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;005cbe90&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba10&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="31" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;00031c&lt;/st1:chmetcnv&gt;49&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba14&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00122ddb&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba18&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77fa8468 ntdll!RtlpDebugPageHeapAllocate+0x&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="2" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;2f&lt;/st1:chmetcnv&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="1" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;1c&lt;/st1:chmetcnv&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;77faa&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="27" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;27a&lt;/st1:chmetcnv&gt; ntdll!RtlDebugAllocateHeap+0x2d&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba20&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;60e22 ntdll!RtlAllocateHeapSlowly+0x41&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bba24&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="77" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;77f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="46" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;46f&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="5" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;5c&lt;/st1:chmetcnv&gt; ntdll!RtlAllocateHeap+0xe&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="3" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;3a&lt;/st1:chmetcnv&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bd5d4&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;0046b404 Customer_App+0x6b404&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bd5d8&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;0046b426 Customer_App+0x6b426&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;005bd5dc&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;00427612 Customer_App+0x27612&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In normal condition, the callstack to allow memory should be random. However, above analysis shows that most of the heap pointers are allocated by the same callstack. The callstack is likely the root cause. By matching with PDB, I got the function name, and the customer confirmed the leak in that function.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3231372" width="1" height="1"&gt;</description></item><item><title>Exception and Debug Event, the feedback from OS</title><link>http://blogs.msdn.com/lixiong/archive/2007/06/06/exception-and-debug-event-the-feedback-from-os.aspx</link><pubDate>Tue, 05 Jun 2007 16:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3099944</guid><dc:creator>lixiong</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/3099944.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=3099944</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 16pt"&gt;&lt;FONT face="Times New Roman"&gt;Exception and Debug Event, the feedback from OS&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;This section will firstly brief exception related tech, and then use example to demonstrate how to use exception to troubleshoot effectively.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Exception Brief&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Exception is a mechanism to control code’s execution flow. In normal situation, the code executes consequently, like the following:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;*p=11;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;printf(“%d”,*p);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It should print 11. But how about if p points to an invalid memory address? Then the line to assign value to *p will trigger access violation exception, and the following line to print may not execute any more.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For applications, if the behavior does not follow the expectation, exception is likely a direct cause because this is the most obvious and common way that changes the execution flow. In most cases, troubleshooting problem is just the same meaning of troubleshooting exception.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In original Chinese version, I discuss how the OS plays an important role on exception handling and dispatching. Also I brief how different programming language leverages the SEH to support the exception handing mechanism. I will skip such introduction here because the following two articles cover them all:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;A Crash Course on the De&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;hs of Win32™ Structured Exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ion Handling&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.microsoft.com/msj/0197/Exception/Exception.aspx"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://www.microsoft.com/msj/0197/Exception/Exception.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;RaiseExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ion&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/raiseexception.asp"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/raiseexception.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case study, how to let C++ dump the callstack as the C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the application created by C# or Java, when exception occurs, they are able to dump the call stack where the exception comes from. However, for C++, we have to use debugger to get the callstack. Now the customer wants to achieve stack dump in C++. Any good idea?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;My solution is to use SEH, due to that local variable’s destructor will be executed during stack unwind when exception occurs. The sample code worked fine in VC6+Win2k3 platform. However, when I retry the sample, the same code behaves strangely in VC2005 + Win2k3 SP1. If I compile in debug mode, it works fine. However, in release mode, the application quits silently. For the whole story, I saved in my MSN blog (English), please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;SEH,DEP, Compiler,FS:[0] and PE format&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!712.entry"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!712.entry&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case study, Why Dr. Watson cannot save the dump file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Problem Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The customer reports their VC application crashes randomly. To obtain detailed info, the customer registers Dr. Watson so that when exception occurs next time, we can get the dump file. However, when the problem reoccurs, Dr. Watson saves nothing.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Background Info:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In Chinese version, I provided brief info about what dump file is, and what info we can find in dump. Related info can be found at:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Descri&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ion of the Dr. Watson for Windows (Drwtsn32.exe) Tool&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=308538"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=308538&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Specifying the Debugger for Unhandled User Mode Exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ions&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=121434"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=121434&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;INFO: Choosing the Debugger That the System Will Spawn&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=103861"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=103861&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Generally speaking, by setting the AeDebug registry key, we can lunch the debugger when application crashes. If we choose Dr. Watson as the debugger, the default behavior is generating the dump file.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Problem Analysis:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Back to the case, the customer fails get the dump file, possible causes:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The Dr. Watson’s bug. It works abnormally.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The customer’s application does not crash, it just exits like calling ExitProcess.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;To perform test against point 1, I provided the following sample code for testing:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; *p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With above code, Dr. Watson captured the dump file successfully on the customer side. So Dr. Watson works fine. It seems that the crash exclaimed by the customer is not really caused by unhandled exception. Maybe the customer calls ExitProcess unexpectedly. Thus during information capturing, we should not limited in unhandled exception. What we need to check is how the process disappears, maybe normal quit, maybe unhandled exception.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;One possible way to figure out is to run the application in windbg. However, manual operation is troublesome. It would be nice if there is some automatic way. Windows provides a registry, which allows an application starts under debugger. With this setting, when the specified process starts, OS starts the debugger firstly, and pass in the target process and command line to debugger, then debugger starts the target process to debug. This option is very useful especially when we cannot start the process manually, like Windows Service, which starts ahead the user logon:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How to debug Windows services&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?kbid=824344"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?kbid=824344&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 5.25pt; TEXT-INDENT: -5.25pt; mso-char-indent-count: -.5"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Some malicious software uses this way to attach silent process. This method is also called IFEO (Image File Execution Option) hijacking in &lt;st1:country-region w:st="on"&gt;&lt;st1:place w:st="on"&gt;China&lt;/st1:place&gt;&lt;/st1:country-region&gt;.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In windbg folder, there is a script called adplus.vbs. We can use it to launch windbg to obtain the dump file. Here we will use the script:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How to use ADPlus to troubleshoot "hangs" and "crashes"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/kb/286350/EN-US/"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/kb/286350/EN-US/&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Use adplus /? to obtain detailed info.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The Actions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With above analysis, the detailed actions are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;In customer’s machine, create the key named by the problematic process under Image File Execution Options&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Under the key, create a string value called Debugger.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Set the value to &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;Debugger= C:\Debuggers\autodump.bat&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;Edit the C:\Debuggers\autodump.bat as the following:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;cscri&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;.exe C:\Debuggers\adplus.vbs -crash -o C:\dumps -quiet -sc %1&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above setting, when the application starts, the OS launches cscript.exe to execute the adplus.vbs script. The –sc switch in adplus.vbs specify the target process path, -crash means we will monitor for application’s quit, -o specifies the dump output folder, -quiet disables prompt. We can use notepad.exe as test to check if dump is generated when notepad.exe quits.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above setting, when the problem reoccurs, we get two dump files in c:\dumps folder, called:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;FONT face="Times New Roman"&gt;PID-0__Spawned0__1st_chance_Process_Shut_Down__full_&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="178" UnitName="C" w:st="on"&gt;178C&lt;/st1:chmetcnv&gt;_DateTime_0928.dmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;FONT face="Times New Roman"&gt;PID-0__Spawned0__&lt;SPAN style="COLOR: red"&gt;2nd&lt;/SPAN&gt;_chance_&lt;SPAN style="COLOR: red"&gt;CPlusPlusEH&lt;/SPAN&gt;__full_&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="178" UnitName="C" w:st="on"&gt;178C&lt;/st1:chmetcnv&gt;_&lt;st1:chsdate w:st="on" IsROCDate="False" IsLunarDate="False" Day="21" Month="6" Year="2006"&gt;2006-06-21&lt;/st1:chsdate&gt;_DateTime_0928.dmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Pay attention to the second filename. The name indicates the 2&lt;SUP&gt;nd&lt;/SUP&gt; chance C++ exception does happen. Open the dump in windbg, check the callstack, it shows that the customer throws some C++ exception in code, but forgets to capture that. By adding corresponding catch block, the issue gets fixed.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The solution is nice, but why Dr. Watson cannot get the dump?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The Dr. Watson’s behavior still confuses me. Since it is unhandled exception, why Dr.Watson cannot capture the dump file? Firstly I created two different applications to double verify the behavior of Dr. Watson:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; _tmain(&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; argc, _TCHAR* argv[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; 1;&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; _tmain(&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; argc, _TCHAR* argv[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; *p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the first one, Dr. Watson does not save the dump. For the second, Dr. Watson saves the dump. It looks like the behavior is related to the exception type.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Recall the detailed crash behavior for above two applications when the Auto key is set to 0 under AeDebug. On my side, the message boxes for crash are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US style="COLOR: blue"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Microsoft Visual C++ Debug Library&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Debug Error!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Program: d:\xiongli\today\exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ioninject\debug\exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ioninject.exe&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;This application has requested the Runtime to terminate it in an unusual way.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Please contact the application's support team for more information.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;(Press Retry to debug the application)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Abort&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Retry&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Ignore&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US style="COLOR: red"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ioninject.exe - Application Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The instruction at "0x00411908" referenced memory at "0x00000000". The memory could not be "written".&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Click on OK to terminate the program&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Click on CANCEL to debug the program&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;OK&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Cancel&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 2.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;---------------------------&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The behaviors are totally different! And the behavior is related to the compilation mode.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left" align=left&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;SetUnhandledExceptionFilter API is used to modify the default unhandled exception handler. Here, when C++ initialize the CRT, it passes CRT’s implementation (msvcrt!CxxUnhandledExceptionFilter). When unhandled exception occurs, the function checks the exception code. If it is a C++ exception, it shows up the first dialog, otherwise it bypass it to the default handler (ernel32!UnhandledExceptionFilter) provided by the OS. For the 1&lt;SUP&gt;st&lt;/SUP&gt; situation, the callstack is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left" align=left&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;USER32!MessageBoxA&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!__crtMessageBoxA&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!__crtMessageWindowA&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!_VCrtDbgReportA&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!_CrtDbgReportV&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!_CrtDbgReport&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!_NMSG_WRITE&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!abort&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!terminate&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!__&lt;SPAN style="COLOR: red"&gt;CxxUnhandledExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionFilter&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;kernel32!UnhandledExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionFilter&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;MSVCR80D!_Xc&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;Filter&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left" align=left&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the second, it is&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!KiFastSystemCallRet&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!ZwRaiseHardError+0xc&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;kernel32!&lt;SPAN style="COLOR: red"&gt;UnhandledExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionFilter&lt;/SPAN&gt;+0x4b4&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;release_crash!_Xc&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;Filter+0x2e&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;release_crash!mainCRTStartup+0x1aa&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;release_crash!_exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;_handler3+0x61&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!ExecuteHandler2+0x26&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!ExecuteHandler+0x24&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;ntdll!KiUserExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionDispatcher+0xe&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;release_crash!main+0x28&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;release_crash!mainCRTStartup+0x170&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt"&gt;kernel32!BaseProcessStart+0x23&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For detailed info, please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;SetUnhandledExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionFilter&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/setunhandledexceptionfilter.asp"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/setunhandledexceptionfilter.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;UnhandledExce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ionFilter&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/unhandledexceptionfilter.asp"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/unhandledexceptionfilter.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Does above analysis help explain the Dr. Watson’s behavior? To be honest, I do not think so. I think it is due to Dr. Watons’s special handling on different exception types. The detailed research can be found at:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!1213.entry"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!1213.entry&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Debug Event – communication between the OS and the debugger&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Notification, also called Debug Event, it is a mechanism for OS to notify debugger when some thing happens. Similar as exception handing, OS dispatches the notification when some thing happens if the debugger is attached. Unlike exception, the notification can only be monitored by the debugger, not the target process. Also, there is no 1&lt;SUP&gt;st&lt;/SUP&gt; chance and 2&lt;SUP&gt;nd&lt;/SUP&gt; chance differences. In windbg’s help file, all the notifications are listed in the Controlling Exce&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;ions and Events topic. Common notifications are DLL loading, unloading, thread creation and existing.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With exception and notification, we can capture the key for issue.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case study, VB6’s version.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Customer’s VB6 application is not able to open data file created by Access 2003 in developer machine. It works fine for data created by Access 97. In other machines, both Access 2003 and 97 work fine.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;They way to think is direct. Since it occurs in a specified machine, it means the issue is about the environment, not the code. Since it is about Access version, it should be related to the DAO’s version. By checking the modules loaded by the EXE, I found dao350.dll was loaded instead of dao360.dll. The next step is to figure out why dao350.dll gets loaded instead of dao360.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;DAO is a COM component. It is likely created by COM API. A simple way is to trace the execution of the COM API like CoCreateInstanceEx with wt command, like I did in ShellExecute case. However, if we really try that, the wt command may execute for a whole day. It would be better if we can find a more workable way. Since we will trace until the library loading, why not set breakpoint at LoadLibrary to check how the dao350.dll gets loaded?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It is a very good way to set breakpoint on LoadLibrary because:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;DLL loading is not necessary through LoadLibrary. Native API like ntdll!LdrLoadDLL may load the module directly.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If there are hundreds of DLLs to be loaded, breaking into LoadLibrary is troublesome, even if we can set conditional breakpoint to filder.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The better way is to leverage notification. During module load, OS sends notification to the debugger. In Windbg, we can use wide char to match and filter the DLL filename. It is easy to operate. Firstly, use “sxe ld:dao*.dll” command intercept the module load notification. When the filename is dao*.dll, the debugger breaks. (For windbg detailed usage, we will cover in next sections). The result in debugger is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;0:008&amp;gt; sxe ld:dao*.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ModLoad: 1b740000 1b&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="7" UnitName="C" w:st="on"&gt;7c&lt;/st1:chmetcnv&gt;&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="True" SourceValue="8000" UnitName="C" w:st="on"&gt;8000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;C&lt;/st1:chmetcnv&gt;:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;eax=00000001 ebx=00000000 ecx=0013e301 edx=00000000 esi=7ffdf000 edi=20000000&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;eip=&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="7" UnitName="C" w:st="on"&gt;7c&lt;/st1:chmetcnv&gt;82ed54 esp=0013e300 ebp=0013e344 iopl=0&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;nv up ei pl zr na po nc&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;cs=001b&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;ss=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;ds=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;es=0023&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;fs=003b&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;gs=0000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;efl=00000246&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!KiFastSystemCallRet:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="7" UnitName="C" w:st="on"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;7c&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;82ed&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="True" SourceValue="54" UnitName="C" w:st="on"&gt;54 c&lt;/st1:chmetcnv&gt;3&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ret&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!KiFastSystemCallRet&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!NtMapViewOfSection&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!LdrpMapViewOfDllSection&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!LdrpMapDll&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!LdrpLoadDll&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ntdll!LdrLoadDll&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;0013e&lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="9" UnitName="C" w:st="on"&gt;9c&lt;/st1:chmetcnv&gt;4 776ab4d0 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;0013ea40&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt; 00000000 00000008 kernel32!&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;LoadLibraryExW&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClassCache::CDllPathEntry::LoadDll&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClassCache::CDllPathEntry::Create_rl&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClassCache::CClassEntry::CreateDllClassEntry_rl&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClassCache::GetClassObjectActivator&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClassCache::GetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CServerContextActivator::GetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!ActivationPropertiesIn::DelegateGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CApartmentActivator::GetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CProcessActivator::GCOCallback&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CProcessActivator::Attem&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;Activation&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CProcessActivator::ActivateByContext&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CProcessActivator::GetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!ActivationPropertiesIn::DelegateGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CClientContextActivator::GetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!ActivationPropertiesIn::DelegateGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!ICoGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!CComActivator::DoGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;ole32!&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;CoGetClassObject&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;VB6!VBCoGetClassObject&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;VB6!_&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;DBErrCreateDao36DBEngine&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;By checking the parameter of the LoadLibraryExW, it shows&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-highlight: white"&gt;0:000&amp;gt; du 0013ea40 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-highlight: white"&gt;0013ea40&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;"C:\Program Files\Common Files\Mi"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-highlight: white"&gt;0013ea80&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;"crosoft Shared\DAO\&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-highlight: white"&gt;DAO360&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-highlight: white"&gt;.DLL"&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With above information, we see:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;DAO360 is not created by CoCreateInstanceEx. Instead it is created by CoGetClassObject. If we trace CoCreateInstanceEx, it wastes time.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;COM invocation starts from &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier; mso-bidi-font-size: 10.5pt"&gt;VB6!_&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="COLOR: navy; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier; mso-bidi-font-size: 10.5pt"&gt;DBErrCreateDao36DBEngine function. We should check the function in detail.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With previous DLL hell’s lesson, here the first thing is to check VB6.EXE’s version since the function resides in VB6. Compared with normal condition, the workable module version is &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier; mso-highlight: white"&gt;6.00.9782&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;, while the problematic one is &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier; mso-highlight: white"&gt;6.00.8176&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;. By installation of VS6 SP6, the issue gets fixed.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Discussions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;(In Chinese version, I discussed how to analysis the dump even if the dump is not captured at the first place when exception happened. I have to skip here.)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Exit proactively for unhandled exception&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In some situation, the developer exits the application proactively when unhandled exception occurs, instead of waiting for the OS to terminate it. COM+, ASP.NET use this kind of tech. A Chinese C2C software called taobao wangwang (also named ali wangwang) uses this kind of tech too. The benefits are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;We can define the UI for the crash.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;We can save the unhandled exception info for postpone analysis.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;To avoid the interference of the debugger, guarantee the immediate recycle, and try the necessary rescue operation like restarting the process.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It is easy to implement. One way is to use the __try and __except clause. The other way is to use SetUnhandledExceptionFilter API. For the study of taobao wangwang, please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!817.entry"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!817.entry&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; (Chinese)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on my analysis, taobao uses SetUnhandledExceptionFilter to capture unhandled exception, and use MiniDumpWriteDump API to capture the dump proactively.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With this tech, the debugger is hard to get the dump for crash directly. Some additional configuration and windbg command is necessary&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10.5pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How To Obtain a Userdump When COM+ Failfasts&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=287643"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=287643&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How to find the faulting stack in a process dump file that COM+ obtains&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://support.microsoft.com/?id=317317"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=317317&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;How to troubleshoot UnhandledExceptionFilter&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on MSDN, UnahandledExceptionFilter will be invoked only if the debugger is not attached. Thus we can use UnahandledExceptionFilter to bypass the trace of debugger, to protect some sensitive code. To avoid debugger’s check, there are two ways at least:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The target uses IsDebuggerPresent API to check if the debugger is attached. If so, it refuses to execute the sensitive code.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Put the sensitive code to a function, and register the function as UnHandledExceptionFilter. To execute the sensitive code, just trigger an exception manually. Due to the design of exception handling, it avoids the debugger’s trace.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the first way is easy to by pass. Look at the implementation of IsDebuggerPresent:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;:000&amp;gt; uf kernel32!IsDebuggerPresent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;kernel32!IsDebuggerPresent:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;281 77e64860 &lt;st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False" SourceValue="64" UnitName="a" w:st="on"&gt;64a&lt;/st1:chmetcnv&gt;118000000&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,fs:[00000018]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;282 77e64866 8b4030&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,[eax+0x30]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;282 77e64869 0fb64002&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;movzx&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;eax,byte &lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;r [eax+0x2]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;283 77e6486d c3&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ret&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;IsDebuggerPresent checks the flag in FS register. (FS:[18]]:30 saves PEB of current process). In debugger, we can change any of the register easily. Here we just need to change value of [[FS:[18]]:30]:2 to 0 to cheat IsDebuggerPresent to return false.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the second way, changing [[FS:[18]]:30]:2 does not work because the judgment is based on the result of a kernel call. However, it does not mean impossible. Kwan Kyun Kim provides a way to cheat:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;How to debug UnhandleExceptionHandler&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!1208.entry"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://eparg.spaces.msn.com/blog/cns!59BFC22C0E7E1A76!1208.entry&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Next I will discuss memory, including Heap, Stack, and the lovely heap corruption and pageheap.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3099944" width="1" height="1"&gt;</description></item><item><title>Chapter Two, Assemnly code, Exception, Memory, Synchronization and Debugger</title><link>http://blogs.msdn.com/lixiong/archive/2007/06/03/chapter-two-assemnly-code-exception-memory-synchronization-and-debugger.aspx</link><pubDate>Sun, 03 Jun 2007 04:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3053881</guid><dc:creator>lixiong</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/3053881.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=3053881</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 18pt"&gt;&lt;FONT face="Times New Roman"&gt;Chapter Two, Assemnly code, Exception, Memory, Synchronization and Debugger&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;(To save time, I will not translate the full Chinese content. I will skip some knowledge introduction)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;This chapter covers usermode debugging related knowledge and tools, including assembly language, exception, memory layout, CRT, handle/CriticalSection/Thread Switch/Windbg…&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It focuses on how to use the knowledge and tools for effective debugging. For the knowledge itself, the following two books cover them in detail:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Programming Applications for Microsoft Windows&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Debugging Applications for Windows&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The following sections use windbg to demo the debugging. If you want to setup windbg to follow the demo, please go to Section 4, which discusses windbg.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 16pt"&gt;&lt;FONT face="Times New Roman"&gt;Section 1:Assembly code, the minimal unit for CPU execution&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Assembly code is the minimal unit for CPU execution. In following situations, assembly code analysis is necessary:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;There is no problem in uplevel code, like C++ and C#. However, the execution result is incorrect. The compiler and CPU are suspicious.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When the source code is out of hand. Like a Windows API behaves strangely.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When application crashes, like Access Violation. The first hand information in debugger is the assembly op code that accesses memory.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Intel Architecture Manual volume 1,2,3&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.intel.com/design/pentium4/manuals/index_new.htm"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://www.intel.com/design/pentium4/manuals/index_new.htm&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case Study, Analysis the VC compiler optimization&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Problem Description:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The customer is developing a performance sensitive application. He wants to know how the VC compiler optimizes the following code:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;nt&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; hgt=4;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; wid=7;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (i=0; i&amp;lt;hgt; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (j=0; j&amp;lt;wid; j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;A[i*wid+j] = exp(-(i*i+j*j));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The direct way is to check the binary code generated by the compiler. Here is my analysis. You may check on your side first, and compare with mine.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;My analysis:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;My analysis is based on VC6, default release mode settings. (The customer was using VC6 at that time. Now VC6 is out of the product life cycle and Microsoft does not support it any more).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;int hgt=4;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;int wid=7;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;24:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;for (i=0; i&amp;lt;hgt; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="40107" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040107A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;xor&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ebp,ebp&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40107" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040107C&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;lea&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;edi,[esp+10h]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;25:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;for (j=0; j&amp;lt;wid; j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;26:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;A[i*wid+j] = exp(-(i*i+j*j));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #339966; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401080&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ebx,ebp&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401082&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;xor&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi,esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;// The result of i*i is saved in ebx&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401084&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;imul&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ebx,ebp&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401087&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;// Only one imul occurs in every inner loop (j*j)&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401089&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;imul&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,esi&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;// Use the saved i*i in ebx directly.&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt; &lt;SPAN style="COLOR: red"&gt;!!O&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;imized!!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40108" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040108C&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;add&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax,ebx&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040108E&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;neg&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401090&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;push&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;eax&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401091&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;call&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@ILT+0(exp) (00401005)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401096&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;add&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esp,4&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;// Save the result back to A[]. The addr of current offset in A[] is saved in edi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;00401099&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mov&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dword &lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;r [edi],eax&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040109B&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;inc&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: fuchsia; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;// Simply add edi by 4. Does not calculate with i*wid. Imul is never used. &lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;!!O&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;imized!!&lt;/SPAN&gt;&lt;/I&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="40109" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040109C&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;add&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;edi,4&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="F" SourceValue="40109" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;0040109F&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cmp&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;esi,7&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4010" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;004010A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;2&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;jl&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;main+17h (&lt;SPAN style="COLOR: red"&gt;00401087&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4010" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;004010A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;4&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;inc&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ebp&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; TEXT-ALIGN: left; mso-para-margin-left: 1.0gd; mso-layout-grid-align: none; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4010" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;004010A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;5&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cmp&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ebp,4&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4010" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;004010A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt; mso-bidi-font-family: Verdana"&gt;8&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;jl&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;main+10h (&lt;SPAN style="COLOR: #339966"&gt;00401080&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The optimization is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Since i*i result does not change in inner loop, the compiler caches the result of i*i in ebx register.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;For A[i*wid+j] data fetch, only j changes in inner loop, and j increases one each time. Since A is an int array, the next fetch address increases 1*sizeof(int), which is 4. The compiler caches i*wid+j into EDI, and uses “add edi,4” to optimize the fetch address calculation.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The compiler saves temp variable in register to avoid memory access.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Can you do a better job than the compiler by writing the assembly code manually?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case Study: VC2003 compiler’s bug. C++ application works in debug, crashes in release&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The compiler’s bug does exist. If you test the following code in VS2003, it crashes in release mode:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;// The following code crashes/abnormal in release build when "whole program o&lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;imizations /GL"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;// is set. The bug is fixed in VS2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#include&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: maroon"&gt;&amp;lt;string&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;warning&lt;/SPAN&gt;( &lt;SPAN style="COLOR: blue"&gt;push&lt;/SPAN&gt; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;warning&lt;/SPAN&gt;( &lt;SPAN style="COLOR: blue"&gt;disable&lt;/SPAN&gt; : 4702 )&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// unreachable code in &amp;lt;vector&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#include&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: maroon"&gt;&amp;lt;vector&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;warning&lt;/SPAN&gt;( &lt;SPAN style="COLOR: blue"&gt;pop&lt;/SPAN&gt; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#include&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: maroon"&gt;&amp;lt;algorithm&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;#include&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: maroon"&gt;&amp;lt;iostream&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: maroon; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;//vcsig&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;// T = float, U = std::cstring&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;template&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &amp;lt;&lt;SPAN style="COLOR: blue"&gt;typename&lt;/SPAN&gt; T, &lt;SPAN style="COLOR: blue"&gt;typename&lt;/SPAN&gt; U&amp;gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;T func_template( &lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; U &amp;amp; u )&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::cout&amp;lt;&amp;lt;u&amp;lt;&amp;lt;std::endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;* str=u.c_str();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;printf(str);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static_cast&lt;/SPAN&gt;&amp;lt;T&amp;gt;(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;void&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; crash_in_release()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::vector&amp;lt;std::string&amp;gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp; &lt;/SPAN&gt;vStr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vStr.push_back(&lt;SPAN style="COLOR: maroon"&gt;"1.0"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vStr.push_back(&lt;SPAN style="COLOR: maroon"&gt;"0.0"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vStr.push_back(&lt;SPAN style="COLOR: maroon"&gt;"4.4"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::vector&amp;lt;&lt;SPAN style="COLOR: blue"&gt;float&lt;/SPAN&gt;&amp;gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vDest( vStr.size(), 0.0 );&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::vector&amp;lt;std::string&amp;gt;::iterator _First=vStr.begin();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::vector&amp;lt;std::string&amp;gt;::iterator _Last=vStr.end();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::vector&amp;lt;&lt;SPAN style="COLOR: blue"&gt;float&lt;/SPAN&gt;&amp;gt;::iterator _Dest=vDest.begin();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;std::transform( _First,_Last,_Dest, func_template&amp;lt;&lt;SPAN style="COLOR: blue"&gt;float&lt;/SPAN&gt;,std::string&amp;gt; );&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;_First=vStr.begin();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;_Last=vStr.end();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;_Dest=vDest.begin();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt; (; _First != _Last; ++_First, ++_Dest)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;*_Dest =&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;func_template&amp;lt;&lt;SPAN style="COLOR: blue"&gt;float&lt;/SPAN&gt;,std::string&amp;gt;(*_First);&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;int&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; main(&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;*)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;getchar();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;crash_in_release();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The compiler settings are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Disable precompiler header.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Use /O2 /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /EHsc /ML /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W4 /nologo /c /Wp64 /Zi /TP&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Trace assembly execution:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on bellow initial analysis, the problem is likely a compiler bug:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Besides cout and printf, there is no system related API call any more. All the operations are based on registers and memory. The environment and system factor are not involved here.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The code looks good. If we adjust the place of std::transform, to put it behind the for loop, the problem does not occur any more.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The compiler setting matters.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In the code, both std::transfor and the for loop do the same vector translation by calling func_template. Comparing the difference may help. I set breakpoint in the entry of main, and use ctrl_alt_D to go into assembly code mode. Trace the execution step by step, found:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In the implementation of STL in VS2003, the std::transform uses the following code to invoke the translator function:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;*_Dest = _Func(*_First);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The compiler handles the call with the following:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;EAX = 0012FEA8 EBX = &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="37138" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0037138C&lt;/st1:chmetcnv&gt; ECX = 003712BC EDX = 00371338 ESI = &lt;SPAN style="COLOR: red"&gt;00371338 &lt;/SPAN&gt;EDI =&lt;SPAN style="COLOR: black"&gt; 003712B0 EIP = 00402228 &lt;/SPAN&gt;ESP = 0012FE70 EBP = 0012FEA8 EFL = 00000297 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;&amp;nbsp;&amp;nbsp; 388: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *_Dest = _Func(*_First);&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;00402228 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;push&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;00402229 &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;call&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dword &lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;r [esp+28h] &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 24pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;0040222D fstp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dword &lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;r [edi]&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The parameter is saved in ESI, which is used to call func_template. As above, std::transform passes the parameter to func_template by pushing into stack.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left" align=left&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;While in the for loop, the compiler handles the&lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;*_Dest =&amp;nbsp; func_template&amp;lt;&lt;SPAN style="COLOR: blue"&gt;float&lt;/SPAN&gt;,std::string&amp;gt;(*_First); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With the following&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;EAX = 003712B0 EBX = &lt;SPAN style="COLOR: red"&gt;00371338 &lt;/SPAN&gt;ECX = 003712BC EDX = 00000000 ESI = &lt;SPAN style="COLOR: red"&gt;00371338 &lt;/SPAN&gt;EDI = &lt;st1:chmetcnv w:st="on" UnitName="C" SourceValue="37138" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;0037138C&lt;/st1:chmetcnv&gt; EIP = &lt;SPAN style="COLOR: black"&gt;00401242 &lt;/SPAN&gt;ESP = 0012FE98 EBP = 003712B0 EFL = 00000297&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *_Dest =&amp;nbsp; func_template&amp;lt;float,std::string&amp;gt;(*_First);&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;00401240 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;mov&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ebx,esi &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;00401242 &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;call&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; func_template &amp;lt;float,std::basic_string&amp;lt;char,std::char_traits&amp;lt;char&amp;gt;,std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt; (&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;4021A&lt;/st1:chmetcnv&gt;0h) &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;00401247 fstp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dword &lt;st1:PersonName w:st="on"&gt;pt&lt;/st1:PersonName&gt;r [ebp] &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;As above, in for loop, the parameter uses mov opcode to save the parameter into ebx, and then passes to func_template.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;At last, let’s check how func_template handles the parameter passed in:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;004021A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;0 push&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;004021A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;1 push&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; edi&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout&amp;lt;&amp;lt;u&amp;lt;&amp;lt;std::endl;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;004021A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;2 &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;push&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ebx&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: red; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;004021A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;3 push&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;offset std::cout (414170h) &lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left&gt;&lt;st1:chmetcnv w:st="on" UnitName="a" SourceValue="4021" HasSpace="False" Negative="False" NumberType="1" TCSC="0"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;004021A&lt;/SPAN&gt;&lt;/st1:chmetcnv&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: gray; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt"&gt;8 call&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::operator&amp;lt;&amp;lt;&amp;lt;char,std::char_traits&amp;lt;char&amp;gt;,std::allocator&amp;lt;char&amp;gt; &amp;gt; (402280h)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-font-kerning: 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Here it pushes ebx into stack, and then invoke std::cout, without reading the stack for parameter passed in. It means func_template, the callee believes the parameter should be passed from register. However, in transform function, the caller, the parapeter is passed by stack. This mismatched handling causes the crashes.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;But why the problem only occurs in release mode, not debug mode? You can analysis by the same way.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Case Study, how the notorious DLL Hell causes Server Unavailable for ASP.NET&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The ASP.NET web site reports Server Unavailable for any page request. When the w3wp.exe host process starts, it crashes immediately when handling the request. With further analysis in debugger, the source for the crashes is a null pointer access. However, from the callstack, every module forms from w3wp.exe and .NET Framework. It does not reach the customer’s code. By checking with relative code, the null pointer is passed from the caller to the callee. The problem occurs when the callee uses the parameter. Obviously, next we should check why the caller does not pass correct parameter to the callee.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The strange thing is, the pointer in caller’s function is initialized already. It is a valid pointer in the caller just before the call function. It is also pushed to the stack correctly. Why the caller gets an invalid pointer by fetching it from the stack? With single step trace with the execution, the problem is, the caller puts the parameter in callee’s [ebp+8], while the callee fetches the parameter from [ebp+c]. Is it similar with the previous case? The murderer is not compiler this time, it is the DLL version. The caller and callee resides in two different DLLs. The caller’s DLL version is .NET Framework 1.1 version, while the callee’s DLL version is .NET Framework 1.1 SP1. In CLR1.1, the callee accepts 4 parameters, while the new version changes it to accept 5 parameters. The caller passes the parameter as the old style, while the callee fetches it with new style. A typical DLL hell problem. After reinstalling the CLR 1.1 SP1 to match the DLL version, and reboot, it works fine.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Why the DLL files versions is different, possible causes:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;After the .NET Framework 1.1 SP1 is installed, the customer does not reboot it. Some DLL in use is locked and pending to update after the reboot.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The web server is a node of &lt;st1:place w:st="on"&gt;&lt;st1:PlaceName w:st="on"&gt;Application&lt;/st1:PlaceName&gt; &lt;st1:PlaceType w:st="on"&gt;Center&lt;/st1:PlaceType&gt;&lt;/st1:place&gt; cluster. The cluster sever will sync the file versions in all the nodes. If we just apply .NET Framework 1.1 SP1 in a single node, the file version may be rolled back by the application center:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;PRB: &lt;st1:place w:st="on"&gt;&lt;st1:PlaceName w:st="on"&gt;Application&lt;/st1:PlaceName&gt; &lt;st1:PlaceType w:st="on"&gt;Center&lt;/st1:PlaceType&gt;&lt;/st1:place&gt; Cluster Members Are Automatically Synchronized After Rebooting&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://support.microsoft.com/kb/282278/en-us"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/kb/282278/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Discussion:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Release compilation is always faster than debugging?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Run the following code in release and debug mode, compare the performance. The debug version will be faster than release version. Why?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;long&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; nSize = 200;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;* pSource = (&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *)malloc(nSize+1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt;* pDest = (&lt;SPAN style="COLOR: blue"&gt;char&lt;/SPAN&gt; *)malloc(nSize+1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;memset(pSource, &lt;SPAN style="COLOR: maroon"&gt;'a'&lt;/SPAN&gt;, nSize);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pSource[nSize] = &lt;SPAN style="COLOR: maroon"&gt;'\0'&lt;/SPAN&gt;; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DWORD dwStart = GetTickCount();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;for&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; i=0; i&amp;lt;5000000; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;strcpy(pDest, pSource);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DWORD dwEnd = GetTickCount();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;printf(&lt;SPAN style="COLOR: maroon"&gt;"%d"&lt;/SPAN&gt;, dwEnd-dwStart);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Write your own strcpy function, compare the performance with the default version shipped in VS. Can you do faster than the default version?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In above samples, the decisive factors are:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;In 32 bits chips, try to move a DWORD once instead of 4 times byte move. Pay attention to the align of the 4bytes boundary.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Here the strcpy is called many times. Using inline version reduces the high cost of the call opcode.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;Next I will discuss section2, exception handling.&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3053881" width="1" height="1"&gt;</description></item><item><title>How the Chinese UI in SharePoint turns to English randomly</title><link>http://blogs.msdn.com/lixiong/archive/2007/06/03/how-the-chinese-ui-in-sharepoint-turns-to-english-randomly.aspx</link><pubDate>Sat, 02 Jun 2007 15:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3046831</guid><dc:creator>lixiong</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/3046831.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=3046831</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 15pt"&gt;&lt;FONT face="Times New Roman"&gt;How the Chinese UI in SharePoint turns to English randomly.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Problem Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Windows SharePoint Portal is a web application that runs on .NET Framework, based on ASP.NET. The Administrator is able to configure the UI language, like English or Chinese. Someday a customer complained that their SharePoint could not show Chinese any more. The detailed behaviors were:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The configuration is set to Chinese.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The application works fine in the past year.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;In most cases, the Chinese UI shows fine.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Occasionally, the UI shows in English.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;5.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;It will turn back to Chinese automatically after some time.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;6.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If we restart IIS service when the UI is in English, it may turn back immediatlly.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Troubleshooting:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;After basic check, the configurations are fine. With some initial debugging I found:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When the problem occurs, the customer’s worker thread UI culture is zh-cn, which is under the expectation.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face="Times New Roman"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The implementation for the UI language is based on the ResourceManager.GetString method:&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt"&gt;&lt;FONT face="Times New Roman"&gt;ResourceManager.GetString&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/system.resources.resourcemanager.getstring.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn2.microsoft.com/en-us/system.resources.resourcemanager.getstring.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The satellites assemblies for UI are installed correctly.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above information, the GetString CLR API call should return the Chinese resource. However, when the problem occurs, it returns English resource. Thus, the problem turns out to be, why the CLR API call behaves incorrectly. The difficult part is:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;We cannot reproduce the problem simplify and consistently.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The problem occurs in the customer’s production server only. In test server, it does not occur. We need remote debugging on the production server.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The problem is caused by the CLR code, not the customer’s code. We cannot add trace to save execution log to check like what we did in the 3&lt;SUP&gt;rd&lt;/SUP&gt; case.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;At the same time, there were several similar issues reported in &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Europe&lt;/st1:place&gt;. In &lt;st1:place w:st="on"&gt;&lt;st1:country-region w:st="on"&gt;Japan&lt;/st1:country-region&gt;&lt;/st1:place&gt;, it was more sericious and more than 10 sites got the same issue without solution for several weeks.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Since the only clue is GetString method, the troubleshooting plan is straight forward: trace the execution of the GetString method. Before jumping into remote debugging, firstly I performed research on the logic of GetString method:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When the UI resources are loaded from satellites assemblies, they are saved in an internal HashTable.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The GetString checks if the resource requested is in the HashTable, if it is, go to step 5.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If it is not there, GetString asks ResourceManager to load the resource from satellites assemblies based on current thread UI Culture&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;ResourceManager reads the resources from satellites assemblies and saved into the HashTable&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;5.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;GetString returns the resource from the HashTable for the request&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;6.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If any problem occurs in above steps, like Satellites assemblies were not found, it falls back to use UI neutral (English by default) resource.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;7.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When the HashTable is initialized and resources are loaded, the ResourceManager is out of the story. GetString always returns the resource found in HashTable directly.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above logic, it is likely that the ResourceManager fails to load the satellite assemblies. So it uses neutral resource instead. Based on this info, I used Filmon to check the file operations on the satellites files. However, Filemon shows all the file operations on resource file succeeded.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Since I tried everything I could think of, I had to use remote debugging to check. After the communication with customer, they allowed me to connect to the production server between 10 pm to 8 am in the next morning. To avoid the obstruction from client request and our test, I used the following steps:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;In IIS setting, I restrict the client IP for our test client only.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Set the timeout to infinite to avoid timeout when debugger hangs the server.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Restart IIS every time before debugging.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Use the client browser to refresh the page, and trace the execution in debugger.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;IP restriction is used to avoid obstruction from other clients. Restarting IIS is necessary because the HashTable initializes only once per life time. After several days hard working, found:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;It fails when loading the satellites assemblies file.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;During the satellites loading, there are two first chance CLR exception.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l5 level1 lfo6; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;When the problem occurs, there are some string codepath executed. In local test, we do not see such codepath.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above results, I verified the code in detail specifically. Combing with the wt command and exception monitoring, I captured some dump files during the strange codepath. After research, I found an important information: the customer installed .NET Framework 1.1 SP1. These codepath were new in SP1.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The full story is the following. In CLR 1.1, ResourceManager starts to probe the satellites assembly after checking the UI culture for current thread. In SP1, a new feature is added. Besides the UI culture setting, we can also use configuration file to guide the probing as well. For ASP.NET and Sharing Point, the configuration file is web.config. However, the web.config file is very important, and normal anonymous web user does not get the privilege to open it. When the code tries to check the settings in web.config, if the access denied, an CLR exception will be thrown. Due to the exception, the ResourceManager believes that something goes wrong in resource probing, and it falls back immediately to use neutral resource, hence the English shows instead of Chinese.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In other prospective, the developer did not expect that most users are now allowed to tough the application configuration file. (web.config here) in web applications. The web situation is not handled specially, thus it breaks a lot of web applications.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;After the user restarts IIS, if the first request comes from an authorized user, who has the privilege to access the web.config file, the Chinese resource will be loaded fine and the problem does not occur. If the first uses cannot open the web.config file, the problem happens, and it keeps there until IIS restarting because the HashTable only initializes once per life. For the problem, the workaround is to set web.config for Everyone Read Allow. This workaround solves the SPS urgent issue globally.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Modifying the access privilege for web.config may cause security issue. Asking the developer to fix and applying a hotfix is the final solution:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;FIX: Your application cannot load resources from a satellite assembly if the impersonated user account does not have permissions to access the application .config file in the .NET Framework 1.1 Service Pack 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt; mso-para-margin-left: 1.0gd"&gt;&lt;SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"&gt;&lt;A href="http://support.microsoft.com/?id=894092"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://support.microsoft.com/?id=894092&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Lesson:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;I reviewed the troubleshooting history after the solution. In fact, I was quite near to the solution in my initial checks. I used Filemon to check the satellite assemblies file operations, but I did not go further to check for the other important files. I opened the Filemon result, search Access Denied, got more than 30 plances, all in web.config file. Meanwhile, I should have awarded that some recent released patch was suspicious because the problem did not occur in past 1 year, but flooded in several weeks globally.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Clear thought, good analysis and effective debugging is very good. However, if we can think out of the box sometime, we can do better.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;End for the chapter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The 1&lt;SUP&gt;st&lt;/SUP&gt; chapter demonstrated 4 cases. When faceing with a problem next, if you think a bit more before action, you got what I want to say. There is no troubleshooting template. Instead, it matters about the way of think, how you use your brain, and some of the luck.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Next chapter, I will start to discuss some important knowledge for effective troubleshooting, including exception handling, memory, windbg, and……&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3046831" width="1" height="1"&gt;</description></item><item><title>A boring, but typical, difficult case ---- ASP.NET session lost</title><link>http://blogs.msdn.com/lixiong/archive/2007/05/31/a-boring-but-typical-difficult-case-asp-net-session-lost.aspx</link><pubDate>Wed, 30 May 2007 17:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2990577</guid><dc:creator>lixiong</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/2990577.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=2990577</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 15pt"&gt;&lt;FONT face="Times New Roman"&gt;A boring, but typical, difficult case, ASP.NET session lost&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Problem Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;It was an large ASP.NET project. In testing environment, everything is fine. In production environment, when the load went up, an unhandled NullReferenceException occurred randomly. Based on the analysis on code, it occurred when trying to access an Session Object, which should be already set somewhere. The issue only occurred 3 times in the past half year, and in 3 different pages.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;The Strategy&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;If the problem occurs a bit frequently, we may get a chance to gather some common pattern, like some special user action, or special data input. But it occurred only 3 times, almost no chance for further test. We must make very comprehensive and solid action plan so that we captured enough info when the problem occurs again.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The way to think is quite straight forward. Learn the detail about session. Summarize all the possibilities and capture info accordingly.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;For the Session in detail, please refer to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Underpinnings of the &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:PlaceName w:st="on"&gt;Session&lt;/st1:PlaceName&gt; &lt;st1:PlaceType w:st="on"&gt;State&lt;/st1:PlaceType&gt;&lt;/st1:place&gt; Implementation in ASP.NET&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNetSessionState.asp"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNetSessionState.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With full understanding of ASP.NET session, the issue should fall into one of the following possibilities:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;It is a load-balance environment, but we are using In-Proc session, or the machine-keys are not synced in these services. The customer confirmed there was only one server, with In-Proc session. Thus this is not the case.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The simplest situation is that all the users’ session get lost when the problem happens. Such situation is usually caused by appDomain recycle or IIS crashes. We can check performance monitor (appDomain Restart counter) or Event log (for crash) to check.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;It is a bit difficult if the problem only impacts some user(s), not all. To verify with log, in Session_Start event, we can save the session creation time and current session id into a local log file. Meanwhile, we will save another test value into the session. When the problem occurs, in the ASP.NET global error handling function, we get the session id for current user, and compare with the local log. If the session is just created, it is likely a client side problem like cookie lost.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If the session is not just created, then let’s check if the test value we saved inSession_Start is lost either. If the test value gets lost as well, we are sure that some code in server side clears the whole session, probably Session.Clear.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;5.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;If the session is not just created, and the test value is still there, the issue should be caused by the last modification on the null session value which causes the NullReferenceException. In such situation, we have to log all the Session operations on that session object in server side to trace.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;As above, the different behaviors are tightly bound to different potential causes. As a summary, we need to figure which situation below it belongs to:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;All the session values get lost for all the users.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;All the session values get lost for a specified user.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Some session values get lost for a specified user, while other session values are still there.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Then we can decide the next step for further narrow down, like:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Check appDomain Recycle or Crash for situation 1.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Checking session creation time for situation 2.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo3; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Search Session.Clear function call in all the code, or use debugger to set condition breakpoint during execution for situation 3.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Action and Root Cause&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Based on above analysis, we started working on the code to implement the log mechanism. The customer also added further log to trace some important function invocations.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;After one week waiting, the problem gets reproduced. In log file, we found:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Some session values get lost for a specified user, while other session values are still there&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Based on the session creation time, the session was alive for a long while.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo4; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;From the execution trace in log file, the problematic session value is indeed cleared by server side code. The design is, after a workflow cycle, sessions are cleared in a central place. After that, the page will be redirected to a special page for initialization job for next workflow cycle. The log shows that, there is only clearance job to clear the session, no initialization job to reset the session.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With above information, we started careful code review for the joint place. I found the redirection is performed by client side javascript. It is a typical fault for web application. Since javascript depends on client browser behavior very much, it is better to use http 302 for redirection instead of client script. It is also a must to use server side code to verify everything that relies on client.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;HTTP Status code definition&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;With above change, the problem gets resolved. Session lost is not an interesting case, but it is very typical:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The issue behaves simple, straight forward, but hard to reproduce.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;The root cause resides quite earlier than the problem behavior. We cannot get very useful info if we only check when the problem appears out. We have to collection information proactively.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo5; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Fancy conditional breakpoint in windbg are cool, but log is the last reliable friend for really tough cases. Deep understanding of the product and carefully analysis on the problem help effective log.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Next I will discuss, How the Chinese UI in SharePoint turns to English randomly. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2990577" width="1" height="1"&gt;</description></item><item><title>How a single ShellExecute call opens a TXT file, with another GIF open unexpectedly</title><link>http://blogs.msdn.com/lixiong/archive/2007/05/28/how-a-single-shellexecute-call-opens-a-txt-file-with-another-gif-open-unexpectedly.aspx</link><pubDate>Mon, 28 May 2007 13:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2946040</guid><dc:creator>lixiong</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/lixiong/comments/2946040.aspx</comments><wfw:commentRss>http://blogs.msdn.com/lixiong/commentrss.aspx?PostID=2946040</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Problem Description:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;A customer called in, complained angrily. “A call to ShellExecute API, passing in a local txt file path, it opens a GIF file occasionally with the txt file! Definitely!” The customer was sure that the parameter was correct, and the return value for ShellExecute indicated the call succeeded.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Initial thinking&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;I thought it for 2 mins, told the customer.” Impossible, if you are doing right”. The only possible cause is the parameter is a batch file, or the system is cracked. And even if this is the case, the behavior should be consistent, not occasionally. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;I was wrong. After checking the screen-shot, and reproduced the problem locally with the project received from the customer, I have to believe a single call to ShellExecute opens two files sometime.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;In below analysis, you will find out how it occurs. But the important thing here is, believe the truth, not the experience. If I told the customer that ShellExecute API came from NT4, so robust, the only possibility was some anti-Virus software, I would loss the chance to find out the truth.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;U&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;Go deeper:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The application is a traditional MFC Dialog Application. There is an HTMLView, which renders a local HTML file. There is an IMG tag with a local GIF in the HTML. When right clicking on the GIF, customer-defined context menus shows. When a menu item is clicked, the menu item Message Handler calls ShellExecute to open a local TXT file. The TXT extension is bound to UltraEdit, thus the file will be opened by UltraEdit. When the problem occurs, UltraEdit opens TXT file, but it also opens an additional file in binary mode. The additional file is the GIF file where we click the right mouse.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;The customer uses the following code to pop up the context menu, which replaces the default WebControl context menu:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;if&lt;/SPAN&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;(pMsg-&amp;gt;message==WM_RBUTTONDOWN)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;{CMenu menu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;menu.LoadMenu(IDR_MENU_MSG_OPEN);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;CMenu *pMenu = menu.GetSubMenu(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (pMenu)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;CPoint pt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;GetCursorPos(&amp;amp;pt);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pMenu-&amp;gt;TrackPopupMenu(TPM_LEFTALIGN, pt.x, pt.y, &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; FALSE;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;Ok, the additional GIF is related to the HTMLView, but what’s the steps to troubleshoot?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face="Times New Roman" size=3&gt;I thought the problem like this. Since ShellExecute opens the GIF file, it means somehow the GIF is related to the ShellExecute call. The ShellExecute should know the GIF file’s path, otherwise how it opens that. Some action plans I can try:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Use Windbg, set bp on ShellExecute to debug. Checking the parameters and step-in to trace how the GIF gets opened.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT size=3&gt;Perform further research on the customer’s code to narrow down the problem.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNorm