GC Helper for Obtaining Live Instances of a Type, or How I Implemented GC.GetAliveInstancesOf<T>()

August 17, 2009

Patrick humbly asks for a method tentatively called GC.GetAliveInstancesOf<T>() that returns a collection of referenced instances of a specific type. While useful, this is something that doesn’t belong in the .NET framework, much more so in the API of the garbage collector, but it’s still very useful for diagnostic scenarios (e.g. SOS yields this information easily through the !dumpheap –type command). The following is a quick and dirty suggestion at an implementation that “automagically” tracks live object instances and returns them on demand. The idea is that the object’s constructor can add a weak reference to the...

Windows 7 Taskbar: Tabbed Thumbnails and Previews in Native Code

August 12, 2009

A few months ago, we’ve taken a look at how you can extend your MDI or TDI application with an individual thumbnail and live preview for each tab (or document) that will be displayed in the Windows 7 taskbar. We’ve seen the temporary managed wrapper that makes this possible, and in the final 1.0 release of the Windows API Code Pack there is a more polished managed API that does the same thing. However, in this post I’d like to focus on the underlying details which you will have to deal with if you’re writing your GUI application...
one comment

Windows 7 RTM Training Kit Updates

August 9, 2009

Windows 7 RTM is out for a few days now for MSDN and TechNet subscribers, and together with the release of the final bits, Microsoft DPE released the final bits of the Windows 7 Training Kit. Our team at Sela worked days and nights to meet the RTM deadline. Specifically, Alon wrote new multi touch and Libraries hands-on labs, Dima (with Ariel’s help) wrote new labs for the Sensors and Location platform, and I wrote a pair of new labs for taskbar features, one using the final 1.0 release of the Windows API Code Pack and WPF and...
no comments

Windows 7 on 512 MB of RAM

My parents’ three year old PC (running Windows XP) was giving them some trouble lately. Specifically, it was so bloated with odd application installations, crapware of all sorts, and years of careless usage, that I figured that only a clean install could salvage the box. So I asked them to make a backup of all the movies, photos and music they had on their computer, and suggested that we do a clean install of Windows 7. The one catch here was that their machine has 512 MB of RAM. If you look at the Windows 7 hardware requirements,...