C++ object for activating and Deactivating Contexts

As explained earlier, the activation context system is implemented as a per-thread (or per-fiber) stack. Activating a context pushes the context onto the stack, deactivating it pops it from the stack. To ensure that the same sequence of pushes and pops is performed, each ActivateActCtx call gets a cookie – an opaque value that identifies…


Fixing Activation Context Pollution

As the number of apps in the world that use side-by-side activation (as a result of depending on the new Visual C++ Runtime v8.0) increases, providers of callable code (libraries, control packs, whatever) may start seeing odd and potentially unexpected behavior. Typically it’s hard to diagnose. Somewhere deep inside your publicly exposed surface area, a…


What’s that awful directory name under WindowsWinSxS?

As the Visual C++ Runtimes version 8.0 is now a side-by-side component, you may have seen what looks like an unreasonably complexly named path from which parts of the CRT are loaded. “Golly, what can they possibly be thinking – creating a directory whose name is full of underscores, numbers, and dots?” The good news…


Making an MSM from whole cloth – Series Intro

Not too long ago, I was asked to provide a set of merge modules for an external team. The restriction was that they could accept an exe whose output was the merge module in question, and it had to generate stable – based on the content – component IDs. I’m being cagy because the team…


Desiging Datastructures for Longevity

One of the more problematic areas of long-lived software is the versioning and updating of shared structures. As improvements come to a package, it’s inevitable that you’ll have to add more fields to a structure. Your structure today may contain two pointers, but tomorrow needs to contain three. If you ship all the bits at…


Registration-free applications and components

An area of new technology in Windows XP and Windows Server 2003 that didn’t get nearly enough coverage is the ability to write applications and components that take full advantage of COM without actually registering anything on the target system.  Apps developed with this registration-free mechanism don’t require a call to RegSvr32 during install to…



Howdy – I’m a software design engineer at Microsoft, in the Windows core technologies group. My work involves isolating applications, components, and the operating system from each other. I don’t have much original or interesting to say, but by gum – I’ll say it here. Like many of my generation, I grew up using computers….