<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Articles</title>
        <link>http://geekswithblogs.net/khanna/category/3646.aspx</link>
        <description>Articles</description>
        <language>en-US</language>
        <copyright>Gaurav Khanna</copyright>
        <managingEditor>gaurav@wintoolzone.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>[Article] Authoring a Stack Walker for X86</title>
            <link>http://geekswithblogs.net/khanna/archive/2008/01/07/article-authoring-a-stack-walker-for-x86.aspx</link>
            <description>&lt;p&gt;&lt;font face="Calibri" size="3"&gt;Stack walking is second nature to debuggers. But if you had more interest in it than just debugging and either:&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font face="Calibri" size="3"&gt;wanted to know what stack walking is about, or&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="Calibri" size="3"&gt;wanted to know how stack walking is implemented, or&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="Calibri" size="3"&gt;wanted to know how a custom stack walker can be authored for your application&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;then you might find the article, &lt;strong&gt;Authoring a Stack Walker for X86, &lt;/strong&gt;useful. Its my attempt to help clarify the basics of stack walking and explain key concepts and show how it can be implemented on x86 platform. The article can be read &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/PermaLink.aspx?ID=141" target="_blank"&gt;&lt;font face="Calibri" size="3"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; and its accompanying stack walker implementation source code can be downloaded from &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/Permalink.aspx?ID=140" target="_blank"&gt;&lt;font face="Calibri" size="3"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;Below is an output from the stack walker implementation discussed in the article:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://www.wintoolzone.com/images/stackwalker_ss.jpg" /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118317"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118317" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/118317.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2008/01/07/article-authoring-a-stack-walker-for-x86.aspx</guid>
            <pubDate>Mon, 07 Jan 2008 12:48:58 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2008/01/07/article-authoring-a-stack-walker-for-x86.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/118317.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/118317.aspx</trackback:ping>
        </item>
        <item>
            <title>[Article] AppDomains and Unhandled Exception Notifications</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/12/15/article-appdomains-and-unhandled-exception-notifications.aspx</link>
            <description>&lt;p&gt;&lt;font size="2"&gt;One always strives to write exception safe application but there are times when an exception can go unhandled. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;In the .NET Framework, the &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.appdomain(VS.90).aspx" target="_blank"&gt;&lt;em&gt;&lt;font size="2"&gt;AppDomain&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;em&gt; &lt;/em&gt;class exposes the &lt;em&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.appdomain.unhandledexception(VS.90).aspx" target="_blank"&gt;UnhandledException&lt;/a&gt;&lt;/em&gt; event that can be used&lt;em&gt; &lt;/em&gt;by by the managed application to know when an exception has gone unhandled. In the writeup, &lt;em&gt;&lt;a href="http://www.wintoolzone.com/PermaLink.aspx?ID=137" target="_blank"&gt;AppDomains and Unhandled Exception Notifications&lt;/a&gt;, &lt;/em&gt;I discuss the specifics of when and how this notification is made, what is the relationship between the thread that had unhandled exception and the AppDomain(s) for which this notification will be done and what should be done during the notification callback.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The source code for the article can be downloaded from &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/downloads/aduehandler.zip" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117754"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117754" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/117754.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/12/15/article-appdomains-and-unhandled-exception-notifications.aspx</guid>
            <pubDate>Sun, 16 Dec 2007 05:46:30 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/12/15/article-appdomains-and-unhandled-exception-notifications.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/117754.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/117754.aspx</trackback:ping>
        </item>
        <item>
            <title>Lessons in Exception Handling</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/05/13/Lessons-in-Exception-Handling.aspx</link>
            <description>&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Working on the CLR's exception handling subsystem is not just challenging but also gives unique opportunities to understand how the various exception handling subsystems (e.g. SEH, C++ EH, etc) work, and in particular, how they interoperate with one another. It was such case that had me discuss one such issue with &lt;/font&gt;&lt;a href="http://blogs.msdn.com/freik/" target="_blank"&gt;&lt;font size="2"&gt;Kevin&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, development lead of the JIT, that he mentions &lt;/font&gt;&lt;a href="http://blogs.msdn.com/freik/archive/2007/03/15/how-to-use-rtlunwindex.aspx" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;That discussion got me exploring the interoperability aspects of EH further and resulted in the bullets listed below. Incase you are interested, download the PDF version of this article from &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/articles/Lessons_in_EH.aspx" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; and the accompanying source code from &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/ListWin32.aspx?Listtype=5" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. For those uninitiated to exception handling, Matt Pietrek's &lt;strong&gt;must&lt;/strong&gt; read article is &lt;/font&gt;&lt;a href="http://www.microsoft.com/msj/0197/exception/exception.aspx" target="_blank"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Now, onto the interoperability aspects of EH.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;i&gt;&lt;font size="2"&gt;Note: the following discussion is in context of the x86 platform&lt;/font&gt;&lt;/i&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;&lt;font size="2"&gt;Catching an exception using __try/__except SEH handler will result in &lt;i&gt;RtlUnwind&lt;/i&gt; being called without exception record&lt;br /&gt;&lt;/font&gt;&lt;/b&gt;&lt;i&gt;&lt;br /&gt;&lt;font size="2"&gt;Structured Exception Handling (SEH) &lt;/font&gt;&lt;/i&gt;&lt;font size="2"&gt;is built into the Windows OS and it is how the OS processes the exceptions. Compilers offer their own specific ways of setting up a &lt;i&gt;SEH handler. &lt;/i&gt;To setup one using Microsoft Visual C++, we use &lt;i&gt;__try/__except &lt;/i&gt;keywords. For example: &lt;br /&gt;&lt;br /&gt;&lt;/font&gt; &lt;p&gt;__try&lt;br /&gt;{ &lt;br /&gt;&lt;span style="color: #0000ff"&gt;printf&lt;/span&gt;("&lt;span style="color: #8b0000"&gt;Calling the /EHSc function\n&lt;/span&gt;"); &lt;br /&gt;InvokeCPPFunction(); &lt;br /&gt;} &lt;br /&gt;__except (IsForUs(GetExceptionInformation())) &lt;br /&gt;{ &lt;br /&gt;&lt;span style="color: #0000ff"&gt;printf&lt;/span&gt;("&lt;span style="color: #8b0000"&gt;In __except\n&lt;/span&gt;"); &lt;br /&gt;} &lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;If the &lt;i&gt;InvokeCPPFunction &lt;/i&gt;throws an exception, the OS will invoke the &lt;i&gt;filter function &lt;/i&gt;(the &lt;i&gt;IsForUs &lt;/i&gt;function referenced in the braces of __&lt;i&gt;except&lt;/i&gt;) and check its return value. The filter function can be passed exception details that can be retrieved using the &lt;i&gt;GetExceptionInformation &lt;/i&gt;function and using that information, it can decide whether it wants to process the exception or not. &lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;If the filter function returns &lt;a href="http://msdn2.microsoft.com/en-us/library/6wxdsc38(vs.80).aspx" target="_blank"&gt;EXCEPTION_CONTINUE_EXECUTION&lt;/a&gt;, the OS retries the instruction that created the exception. However, if the return value is &lt;a href="http://msdn2.microsoft.com/en-us/library/6wxdsc38(vs.80).aspx" target="_blank"&gt;EXCEPTION_CONTINUE_SEARCH&lt;/a&gt;, it tells the OS that the filter function has declined to process the exception and the OS continues its search for the handler in the &lt;i&gt;SEH handler chain &lt;/i&gt;(that is available from &lt;i&gt;FS:0 &lt;/i&gt;on x86 machines for each OS thread). &lt;/font&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;The filter function can also return &lt;a href="http://msdn2.microsoft.com/en-us/library/6wxdsc38(vs.80).aspx" target="_blank"&gt;EXCEPTION_EXECUTE_HANDLER&lt;/a&gt; to tell the OS that it wants to handle the exception and the OS proceeds to invoke the &lt;i&gt;funclet &lt;/i&gt;within the &lt;i&gt;__except &lt;/i&gt;block. But before invoking the &lt;i&gt;funclet, the OS &lt;/i&gt;has to unwind&lt;i&gt; &lt;/i&gt;the call stack. On x86, the code generated by VC++ compiler does this by invoking &lt;i&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms680609.aspx" target="_blank"&gt;RtlUnwind&lt;/a&gt; &lt;/i&gt;API, with &lt;i&gt;NULL &lt;/i&gt;for the third argument - this argument is a pointer to the exception record for the exception being processed. This is done by the compiler by invoking &lt;i&gt;GlobalUnwind &lt;/i&gt;(an internal function) after doing some processing. &lt;i&gt;GlobalUnwind &lt;/i&gt;makes the call to &lt;i&gt;RtlUnwind &lt;/i&gt;as shown below: &lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;@_EH4_GlobalUnwind@4: &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB2 push ebp &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB3 mov ebp,esp &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB5 push ebx &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB6 push esi &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB7 push edi &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FB8 push 0 &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;font size="2"&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;70508FBA push 0&lt;/font&gt; &lt;/em&gt;&lt;/font&gt;&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FBC push offset ReturnPoint (70508FC7h) &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FC1 push ecx &lt;/em&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;70508FC2 call RtlUnwind (70526620h)&lt;/em&gt; &lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;The highlighted &lt;font color="#ff0000"&gt;&lt;strong&gt;red&lt;/strong&gt;&lt;/font&gt; line is the one where NULL is pushed for exception record. &lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;What this implies that all &lt;i&gt;SEH handlers &lt;/i&gt;that are in the x86 FS:0 chain&lt;i&gt;, &lt;/i&gt;prior to the one that agreed to process the exception, will be called by the OS once again to give them a chance to do some cleanup (e.g. release resources) – this is typically known as &lt;i&gt;unwinding &lt;/i&gt;of the stack. And since the unwind was initiated with a NULL for the exception record, if your &lt;i&gt;SEH handler &lt;/i&gt;relies on checking the exception record for details before deciding to do the cleanup, it can potentially fail (e.g. not end up doing the cleanup)! &lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;font size="2"&gt;&lt;b&gt;Corollary Lesson: Don’t throw (and expect to catch &lt;i&gt;correctly&lt;/i&gt;) exception across environment boundaries. E.g. throwing a C++ exception and trying to catch it using a SEH handler&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Since a C++ application can have a mix of both C++ exception handling constructs and SEH exception handing constructs, it is easy to commit the mistake of writing code that throws an exception from C++ EH and excepts that to be &lt;i&gt;correctly &lt;/i&gt;caught and processed in SEH EH constructs – the focus is on correct processing. &lt;br /&gt;&lt;br /&gt;Let’s extend the previous example. Assume that &lt;i&gt;InvokeCPPFunction &lt;/i&gt;is a function in a DLL that was compiled to use C++ EH (using the &lt;i&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/1deeycx5(VS.80).aspx" target="_blank"&gt;/EHSc&lt;/a&gt; &lt;/i&gt;switch) and implemented as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CPPClass2 &lt;br /&gt;{ &lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;: &lt;br /&gt;CPPClass2() &lt;br /&gt;{ &lt;br /&gt;printf("&lt;span style="color: #8b0000"&gt;CPPClass2 constructor\n&lt;/span&gt;"); &lt;br /&gt;} &lt;br /&gt;~CPPClass2() &lt;br /&gt;{ &lt;br /&gt;printf("&lt;span style="color: #8b0000"&gt;CPPClass2 destructor\n&lt;/span&gt;"); &lt;br /&gt;} &lt;br /&gt;}; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CPPClass &lt;br /&gt;{ &lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;: &lt;br /&gt;CPPClass() &lt;br /&gt;{ &lt;br /&gt;printf("&lt;span style="color: #8b0000"&gt;CPPClass constructor\n&lt;/span&gt;"); &lt;br /&gt;} &lt;br /&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ThrowException() &lt;br /&gt;{ &lt;br /&gt;CPPClass2 cpp2; &lt;br /&gt;&lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; 1; &lt;br /&gt;} &lt;br /&gt;~CPPClass() &lt;br /&gt;{ &lt;br /&gt;printf("&lt;span style="color: #8b0000"&gt;CPPClass destructor\n&lt;/span&gt;"); &lt;br /&gt;} &lt;br /&gt;}; &lt;br /&gt;&lt;br /&gt;__declspec (dllexport) &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; InvokeCPPFunction() &lt;br /&gt;{ &lt;br /&gt;CPPClass cpp; &lt;br /&gt;cpp.ThrowException(); &lt;br /&gt;}&lt;br /&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;/b&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2"&gt;We have two classes, &lt;i&gt;CPPClass &amp;amp; CPPClass2 &lt;/i&gt;that have destructors each. &lt;i&gt;InvokeCPPFunction &lt;/i&gt;instantiates &lt;i&gt;CPPClass &lt;/i&gt;object, &lt;i&gt;cpp, &lt;/i&gt;and invokes the &lt;i&gt;ThrowException &lt;/i&gt;method, which in turn, instantiates &lt;i&gt;CPPClass2 &lt;/i&gt;object, &lt;i&gt;cpp2, &lt;/i&gt;and throws an exception. &lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;As per the C++ semantics, when this exception is caught, the destructors should be invoked as they are expected to do the cleanup for the respective class instance. However, &lt;i&gt;this depends upon who catches the exception. &lt;/i&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;In our previous example, &lt;i&gt;InvokeCPPFunction &lt;/i&gt;was invoked from within &lt;i&gt;__try/__except &lt;/i&gt;SEH mechanism. Hence, when &lt;i&gt;ThrowException &lt;/i&gt;throws an exception, the OS walks the &lt;i&gt;FS:0 &lt;/i&gt;chain to look for a handler that will handle the exception. When the OS comes to our &lt;i&gt;__except &lt;/i&gt;block, if the filter &lt;i&gt;funclet &lt;/i&gt;returns EXECEPTION_EXECUTE_HANDLER, as per our last discussion, &lt;i&gt;RtlUnwind &lt;/i&gt;is invoked with a NULL for the exception record pointer. &lt;/font&gt; &lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;When this happens and the unwind call comes to C++ exception handler, the &lt;i&gt;C++ EH does not process the unwind since the exception record is NULL&lt;/i&gt;. This is because C++ EH only processes the unwind when the exception code in the exception record has the C++ exception code (0Xe06d7363). Thus, &lt;i&gt;no destructors are invoked&lt;/i&gt; and that is not something you want. Below is the output this example: &lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://www.wintoolzone.com/images/f060de3d24ca_144A7/clip_image0026.jpg" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="313" src="http://www.wintoolzone.com/images/f060de3d24ca_144A7/clip_image002_thumb1.jpg" width="623" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;Hence, it’s important to catch the exception in the &lt;i&gt;environment/EH-context &lt;/i&gt;it was thrown in, since that &lt;i&gt;EH-context &lt;/i&gt;will know how to process it correctly. &lt;/font&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:1828d01d-0707-4ea1-a8a6-673c0e5d61ee" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Exception%20Handling" rel="tag"&gt;Exception Handling&lt;/a&gt;, &lt;a href="http://technorati.com/tags/RtlUnwind" rel="tag"&gt;RtlUnwind&lt;/a&gt;, &lt;a href="http://technorati.com/tags/RtlUnwindEx" rel="tag"&gt;RtlUnwindEx&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Structured%20Exception%20Handling" rel="tag"&gt;Structured Exception Handling&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SEH" rel="tag"&gt;SEH&lt;/a&gt;, &lt;a href="http://technorati.com/tags/C++%20Exception%20Handling" rel="tag"&gt;C++ Exception Handling&lt;/a&gt;, &lt;a href="http://technorati.com/tags/FS:[0]" rel="tag"&gt;FS:[0]&lt;/a&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113751"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113751" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/113751.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/05/13/Lessons-in-Exception-Handling.aspx</guid>
            <pubDate>Sun, 13 May 2007 23:50:29 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/05/13/Lessons-in-Exception-Handling.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/113751.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/113751.aspx</trackback:ping>
        </item>
        <item>
            <title>Article: Customizing AppDomain Creation</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/03/29/110229.aspx</link>
            <description>&lt;p&gt;Did you have a scenario where you wished you could customize the creation of &lt;em&gt;AppDomains? &lt;/em&gt;Or, you could control how many &lt;em&gt;AppDomains &lt;/em&gt;any code that runs in your application context (e.g. if you are writing a plugin load framework) could create? Or, how about reusing &lt;em&gt;AppDomains &lt;/em&gt;for various assemblies?&lt;/p&gt; &lt;p&gt;I have just finished an article on how any of the above scenarios can be accomplished using the &lt;em&gt;System.AppDomainManager &lt;/em&gt;type, introduced in .NET Framework 2.0, by intercept &lt;em&gt;AppDomain &lt;/em&gt;creation requests.&lt;/p&gt; &lt;p&gt;You can read the article at &lt;a title="Customizing_AppDomain_Creation.aspx" href="http://www.wintoolzone.com/articles/Customizing_AppDomain_Creation.aspx" target="_blank"&gt;http://www.wintoolzone.com/articles/Customizing_AppDomain_Creation.aspx&lt;/a&gt;&amp;nbsp;and download associated source code from &lt;a title="Customizing_AppDomain_Creation_src.zip" href="http://www.wintoolzone.com/downloads/Customizing_AppDomain_Creation_src.zip" target="_blank"&gt;http://www.wintoolzone.com/downloads/Customizing_AppDomain_Creation_src.zip&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110229"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110229" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/110229.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna [gaurav@wintoolzone.com]</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/03/29/110229.aspx</guid>
            <pubDate>Thu, 29 Mar 2007 20:47:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/03/29/110229.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/110229.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/110229.aspx</trackback:ping>
        </item>
        <item>
            <title>How the SSCLI [a.k.a. Rotor] managed &amp;quot;new&amp;quot; works</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/03/29/110228.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: 0.75em; font-family: arial,helvetica,sans-serif"&gt;&lt;font face="Trebuchet MS" size="2"&gt;One of the best ways to understand how the CLR works internally is to have a look at the &lt;strong&gt;&lt;em&gt;SSCLI [a.k.a Rotor]&lt;/em&gt;&lt;/strong&gt; &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/net/sscli/" target="_blank"&gt;&lt;font face="Trebuchet MS" size="2"&gt;source code&lt;/font&gt;&lt;/a&gt;&lt;font face="Trebuchet MS" size="2"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Trebuchet MS" size="2"&gt;In &lt;strong&gt;&lt;a href="http://www.wintoolzone.com/articles/How_Rotor_Managed_New_Works.aspx" target="_blank"&gt;How the SSCLI [a.k.a. Rotor] managed "new" works&lt;/a&gt;&lt;/strong&gt;, I have used &lt;em&gt;Rotor&lt;/em&gt; source code to discuss what happens behind the scenes when you use the managed &lt;em&gt;new&lt;/em&gt; operator to instantiate a managed type, discussing implications of object size, how requests from multiple threads are handled, the different validations that are done, when &lt;em&gt;out-of-memory&lt;/em&gt; exception is thrown, etc. If you are a managed code developer, you may learn a thing or two that can help you write better code besides understanding how the managed allocation works internally.&lt;/font&gt;&lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110228"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110228" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/110228.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna [gaurav@wintoolzone.com]</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/03/29/110228.aspx</guid>
            <pubDate>Thu, 29 Mar 2007 20:46:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/03/29/110228.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/110228.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/110228.aspx</trackback:ping>
        </item>
        <item>
            <title>Article: Customizing AppDomain Creation</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/02/26/Article-Customizing-AppDomain-Creation.aspx</link>
            <description>&lt;p&gt;&lt;font size="2"&gt;Did you have a scenario where you wished you could customize the creation of &lt;em&gt;AppDomains? &lt;/em&gt;Or, you could control how many &lt;em&gt;AppDomains &lt;/em&gt;any code that runs in your application context (e.g. if you are writing a plugin load framework) could create? Or, how about reusing &lt;em&gt;AppDomains &lt;/em&gt;for various assemblies?&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;I have just finished an article on how any of the above scenarios can be accomplished using the &lt;em&gt;System.AppDomainManager &lt;/em&gt;type, introduced in .NET Framework 2.0, by intercept &lt;em&gt;AppDomain &lt;/em&gt;creation requests.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;You can read the article at &lt;/font&gt;&lt;a title="Customizing_AppDomain_Creation.aspx" href="http://www.wintoolzone.com/articles/Customizing_AppDomain_Creation.aspx" target="_blank"&gt;&lt;font size="2"&gt;http://www.wintoolzone.com/articles/Customizing_AppDomain_Creation.aspx&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; and download associated source code from &lt;/font&gt;&lt;a title="Customizing_AppDomain_Creation_src.zip" href="http://www.wintoolzone.com/downloads/Customizing_AppDomain_Creation_src.zip" target="_blank"&gt;&lt;font size="2"&gt;http://www.wintoolzone.com/downloads/Customizing_AppDomain_Creation_src.zip&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113756"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113756" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/113756.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/02/26/Article-Customizing-AppDomain-Creation.aspx</guid>
            <pubDate>Tue, 27 Feb 2007 03:56:09 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/02/26/Article-Customizing-AppDomain-Creation.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/113756.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/113756.aspx</trackback:ping>
        </item>
        <item>
            <title>How the SSCLI [a.k.a. Rotor] managed &amp;quot;new&amp;quot; works</title>
            <link>http://geekswithblogs.net/khanna/archive/2007/02/13/How-the-SSCLI-a.k.a.-Rotor-managed-ampquotnewampquot-works.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: 0.75em; font-family: arial,helvetica,sans-serif"&gt;&lt;font face="tre" size="2"&gt;One of the best ways to understand how the CLR works internally is to have a look at the &lt;strong&gt;&lt;em&gt;SSCLI [a.k.a Rotor]&lt;/em&gt;&lt;/strong&gt; &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/net/sscli/" target="_blank"&gt;&lt;font face="tre" size="2"&gt;source code&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="tre" size="2"&gt;In &lt;strong&gt;&lt;a href="http://www.wintoolzone.com/articles/How_Rotor_Managed_New_Works.aspx" target="_blank"&gt;How the SSCLI [a.k.a. Rotor] managed "new" works&lt;/a&gt;&lt;/strong&gt;, I have used &lt;em&gt;Rotor&lt;/em&gt; source code to discuss what happens behind the scenes when you use the managed &lt;em&gt;new&lt;/em&gt; operator to instantiate a managed type, discussing implications of object size, how requests from multiple threads are handled, the different validations that are done, when &lt;em&gt;out-of-memory&lt;/em&gt; exception is thrown, etc. If you are a managed code developer, you may learn a thing or two that can help you write better code besides understanding how the managed allocation works internally.&lt;/font&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;span class="ztags"&gt;&lt;font size="2"&gt;&lt;font face="tre"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;/font&gt;&lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/.NET%20Framework" rel="tag"&gt;&lt;font face="tre" size="2"&gt;.NET Framework&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/Common%20language%20Infrastructure" rel="tag"&gt;&lt;font face="tre" size="2"&gt;Common language Infrastructure&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/Rotor" rel="tag"&gt;&lt;font face="tre" size="2"&gt;Rotor&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/SSCLI" rel="tag"&gt;&lt;font face="tre" size="2"&gt;SSCLI&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/article" rel="tag"&gt;&lt;font face="tre" size="2"&gt;article&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/clr" rel="tag"&gt;&lt;font face="tre" size="2"&gt;clr&lt;/font&gt;&lt;/a&gt;&lt;font face="tre" size="2"&gt;, &lt;/font&gt;&lt;a class="ztag" href="http://technorati.com/tag/common%20language%20runtime" rel="tag"&gt;&lt;font face="tre" size="2"&gt;common language runtime&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;font face="tre" size="2"&gt; &lt;br /&gt;&lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a class="ztag" href="http://del.icio.us/tag/.NET+Framework" rel="tag"&gt;.NET Framework&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/Common+language+Infrastructure" rel="tag"&gt;Common language Infrastructure&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/Rotor" rel="tag"&gt;Rotor&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/SSCLI" rel="tag"&gt;SSCLI&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/article" rel="tag"&gt;article&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/clr" rel="tag"&gt;clr&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/common+language+runtime" rel="tag"&gt;common language runtime&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Buzznet&lt;/span&gt; : &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/.NET%20Framework" rel="tag"&gt;.NET Framework&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/Common%20language%20Infrastructure" rel="tag"&gt;Common language Infrastructure&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/Rotor" rel="tag"&gt;Rotor&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/SSCLI" rel="tag"&gt;SSCLI&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/article" rel="tag"&gt;article&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/clr" rel="tag"&gt;clr&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/common%20language%20runtime" rel="tag"&gt;common language runtime&lt;/a&gt;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113755"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113755" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/113755.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2007/02/13/How-the-SSCLI-a.k.a.-Rotor-managed-ampquotnewampquot-works.aspx</guid>
            <pubDate>Tue, 13 Feb 2007 10:48:49 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2007/02/13/How-the-SSCLI-a.k.a.-Rotor-managed-ampquotnewampquot-works.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/113755.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/113755.aspx</trackback:ping>
        </item>
        <item>
            <title>Understanding ASP.NET Request Processing Architecture</title>
            <link>http://geekswithblogs.net/khanna/archive/2006/01/11/65472.aspx</link>
            <description>
&lt;p&gt;&lt;font face="Tahoma" size="2"&gt;A nice article explaining it can be read&amp;nbsp;at &lt;a href="http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp"&gt;http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=65472"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=65472" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/65472.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna [gaurav@wintoolzone.com]</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2006/01/11/65472.aspx</guid>
            <pubDate>Wed, 11 Jan 2006 17:30:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2006/01/11/65472.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/65472.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/65472.aspx</trackback:ping>
        </item>
        <item>
            <title>Single Service implementation for WCF, .NET Remoting and ASMX</title>
            <link>http://geekswithblogs.net/khanna/archive/2006/01/05/64931.aspx</link>
            <description>
&lt;div&gt;&lt;font face="Tahoma" color="darkgoldenrod" size="2"&gt;&lt;strong&gt;[Original Post Date: 
4th January 2005]&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;I stumbled on this &lt;/font&gt;&lt;a href="http://blogs.msdn.com/mattavis/archive/2005/10/10/479280.aspx"&gt;&lt;font face="Tahoma" size="2"&gt;post&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="2"&gt; by &lt;/font&gt;&lt;a href="http://blogs.msdn.com/mattavis/"&gt;&lt;font face="Tahoma" size="2"&gt;Matt&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="2"&gt;, which is an excellent article 
that describes how to author a single service that can be consumed by client of 
.NET Remoting, WCF and ASMX.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font face="Tahoma" size="2"&gt;Must Read.&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div id="CSBloggerSig"&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=64931"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=64931" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/64931.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2006/01/05/64931.aspx</guid>
            <pubDate>Thu, 05 Jan 2006 21:55:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2006/01/05/64931.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/64931.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/64931.aspx</trackback:ping>
        </item>
        <item>
            <title>[Article] Sharing State across Clients in Windows Communication Foundation (WCF)</title>
            <link>http://geekswithblogs.net/khanna/archive/2006/01/05/64930.aspx</link>
            <description>
&lt;div&gt;&lt;font face="Tahoma" color="darkgoldenrod" size="2"&gt;&lt;strong&gt;[Original Post Date: 
2nd January 2005]&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;With WCF, state management in services get more 
capabilities than just &lt;em&gt;Singleton &lt;/em&gt;and &lt;em&gt;PerCall &lt;/em&gt;approaches. Two 
new modes have been introduced that take state management to the next level. 
&lt;em&gt;PerSession &lt;/em&gt;and &lt;em&gt;Shareable &lt;/em&gt;modes allow for private sessions and 
shared sessions across specific clients respectively. &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 0in; MARGIN-TOP: 0in; PADDING-LEFT: 0in; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0in"&gt;&lt;font face="Tahoma"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 0in; MARGIN-TOP: 0in; PADDING-LEFT: 0in; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0in"&gt;&lt;font face="Tahoma"&gt;I have authored the article,&lt;strong&gt; Sharing State across Clients in 
Windows Communication Foundation, &lt;/strong&gt;which attempts to help understand 
these modes of state management with complete source code to illustrate their 
behavior and potential usage. You can read the article and download the related 
source code from &lt;/font&gt;&lt;a href="http://www.wintoolzone.com/showpage.aspx?url=search.aspx?Query=Sharing%20State%26QueryType=2"&gt;&lt;font face="Tahoma"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma"&gt;.&lt;/font&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 0in; MARGIN-TOP: 0in; PADDING-LEFT: 0in; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0in"&gt;&lt;font face="Tahoma"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 0in; MARGIN-TOP: 0in; PADDING-LEFT: 0in; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0in"&gt;&lt;font face="Tahoma"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 0in; MARGIN-TOP: 0in; PADDING-LEFT: 0in; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0in"&gt;&lt;em&gt;&lt;font face="Tahoma"&gt;Note: Source code has been written against and tried with WinFX 
November 2005 CTP. &lt;/font&gt;&lt;/em&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=64930"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=64930" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/khanna/aggbug/64930.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gaurav Khanna</dc:creator>
            <guid>http://geekswithblogs.net/khanna/archive/2006/01/05/64930.aspx</guid>
            <pubDate>Thu, 05 Jan 2006 21:54:00 GMT</pubDate>
            <comments>http://geekswithblogs.net/khanna/archive/2006/01/05/64930.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/khanna/comments/commentRss/64930.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/khanna/services/trackbacks/64930.aspx</trackback:ping>
        </item>
    </channel>
</rss>