Geeks With Blogs

WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Inside and Out... An attempt to understand technology better... CLR
[Article] AppDomains and Unhandled Exception Notifications
One always strives to write exception safe application but there are times when an exception can go unhandled. In the .NET Framework, the AppDomain class exposes the UnhandledException event that can be used by by the managed application to know when an exception has gone unhandled. In the writeup, AppDomains and Unhandled Exception Notifications, 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) ......

Posted On Saturday, December 15, 2007 9:46 PM

Enumerating AppDomains - I
Surprisingly, enumerating AppDomains is not that straightforward. The System.AppDomain type does not expose functionality to enumerate them at all. The way to enumerate them will be to use the V1 Hosting interface, ICorRuntimeHost and then invoke the EnumDomains and NextDomain methods against it to get the list. If you are using CLR 2.0, you needn't worry as CLR 2.0 does implement the V1 interfaces as well. Below is the snippet that exemplifies the concept (note: AppDomains will only be enumerated ......

Posted On Saturday, June 9, 2007 8:45 PM

Lessons in Exception Handling
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 Kevin, development lead of the JIT, that he mentions here. That discussion got me exploring the interoperability aspects of EH further and resulted in the bullets listed below. Incase you ......

Posted On Sunday, May 13, 2007 4:50 PM

Article: Customizing AppDomain Creation
Did you have a scenario where you wished you could customize the creation of AppDomains? Or, you could control how many AppDomains any code that runs in your application context (e.g. if you are writing a plugin load framework) could create? Or, how about reusing AppDomains for various assemblies? I have just finished an article on how any of the above scenarios can be accomplished using the System.AppDomainManager type, introduced in .NET Framework 2.0, by intercept AppDomain creation requests. ......

Posted On Monday, February 26, 2007 7:56 PM

How the SSCLI [a.k.a. Rotor] managed "new" works
One of the best ways to understand how the CLR works internally is to have a look at the SSCLI [a.k.a Rotor] source code. In How the SSCLI [a.k.a. Rotor] managed "new" works, I have used Rotor source code to discuss what happens behind the scenes when you use the managed new 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 out-of-memory exception is thrown, etc. If you are ......

Posted On Tuesday, February 13, 2007 2:48 AM

Copyright © Gaurav Khanna | Powered by: