Managed Preview Handlers

January 29, 2009

To set context, a preview handler in Windows Vista and/or Outlook 2007 is a component that provides a preview window for a specific file type (or set of file types).  For example, the default preview handler for .jpg files will display a preview of the image in the Windows Explorer or Outlook preview pane: I’ve always had the impression that writing a shell preview handler was a daunting task involving lots of native code implementing obscure COM interfaces.  I’ve also been sure that the managed interop story was very sad, for the following simple (and...
one comment

Tales from High Memory Scenarios: Part 2

January 28, 2009

In the first part, we looked at a scenario where fiddling with the in-memory field controlling a custom cache size and then externally triggering a garbage collection gave us a likely culprit for a high memory scenario. After having disentangled the first problem, we faced a completely different issue.  One of the apparently-leaking processes didn’t have that many objects in its managed heap.  Inspecting the GC performance counters indicated that there while memory utilization was around 900MB, only 150MB or so of managed objects were actually on the managed heap. We ran the !eeheap –gc WinDbg command...
no comments

Why Concurrency Is Hard (Or: TimedLock Can Get You in Trouble)

January 27, 2009

I’ve just noticed a post by Guy Kolbis discussing a possible solution for deadlocks – ensuring that all locks are taken with a timeout.  To do so, Guy cites the TimedLock struct, originally introduced by Ian Griffiths. The general idea is that instead of using a standard lock{…} block, you wrap your critical section in the following statement: using (TimedLock.Lock(...)) { } Ian even introduces a refinement of this idea by including a sentinel reference type in the struct, in Debug builds, so that if...

Tales from High Memory Scenarios: Part 1

A few days ago, I was visiting a customer with high-memory scenarios in a 64-bit ASP.NET application.  I’m saying “scenarios” because we still don’t know for sure what the problem was, and because we’re pretty confident that there’s more than one underlying cause. Even though there are no conclusive results yet, I wanted to share with you some of the things we did because they are interesting on their own behalf. What we were facing was a set of 4 w3wp.exe processes that were consistently increasing in memory consumption over a period of several hours, starting from...
no comments

Windows 7 Keyboard Shortcuts

The Windows 7 taskbar can cause lots of initial grief for people used to the Quick Launch toolbar.  After all, you do a clean install of Windows 7 and there is no Quick Launch to be found.  (I personally prefer the Vista start menu search box, but that’s just me.) If you’re one of these people, then before you go and bring Quick Launch back from the dead, why don’t you try using the taskbar itself as your launch surface?  By pinning any shortcut to the taskbar, you can effectively create a unified launch and control surface for...
no comments

Welcome to the Windows 7 Taskbar

January 25, 2009

I can’t delay it any further: In the “most exciting feature of the Windows 7 desktop” competition, the new taskbar comes first by a margin. At the first PDC session dedicated to the Windows 7 desktop, Chaitanya Sareen brought us all back to the future with this screenshot of Windows 1.0: Do you see the origins of the new Windows 7 taskbar?  It’s amusing to say it, but the Windows 1.0 taskbar bears more resemblance to the Windows 7 taskbar than the taskbar of Windows Vista does! The evolution of...

The Joy of the HomeGroup

January 24, 2009

You might have heard about this feature before: HomeGroups bring easy home networking back into Windows.  No more complicated setup steps, transferring settings between computers on USB sticks and praying that the firewall configuration allows Joe’s PC to access Jane’s laptop. I won’t reiterate everything that has already been said – the above link is an exhaustive explanation of what a homegroup is and how it works.  Just wanted to share with you that I am using a homegroup at home between my 3 (and counting) machines running Windows 7, and that the sharing experience couldn’t be any...
one comment

Windows 7 Problem Steps Recorder

If you ever encountered application problems in the field, you know how valuable it is to obtain an exact description of what happened from the customer.  If you’re into production debugging, you also know that a dump file can be of enormous help, but often it is simply not enough. Imagine that there is a bug in Microsoft Word which causes it to crash if, after modifying the document properties, changing the default heading style, selecting a line and clicking the ribbon copy command – you click Alt-F4 to close the main window. How easy do you...

Welcome to Windows 7

January 22, 2009

At various points in time during the last 3 months I have had lots of different Windows 7 builds installed on various machines.  Now that the Beta is out, we can focus solely on the Beta build (a.k.a. build 7000). The first thing you will notice about the Windows 7 Beta is the incredibly short installation time.  Even on the fairly slow 5400RPM 1.8” drive that came with my new Dell Latitude XT, it didn’t take more than 30 minutes from initial boot to the fully configured desktop.  This is a huge improvement.  (By the way, the upgrade...
no comments

Hello, Windows 7, My Old Friend

It is such a joy to write this post after almost 3 months of blogging silence!  (It also gives me an opportunity to apologize to you, Dear Reader, for this silence.) During the past 3 months I have been busy preparing training materials, hands-on labs and .NET wrappers for Windows 7.  This was a collaboration between Sela, including yours truly as well as Alon Fliess and Dima Zurbalev, and the Client DPE team at Microsoft (Redmond). The result of this process is a comprehensive course with demos, hands-on labs, detailed presentations and lots of .NET sample code. ...