The Old New Thing

More terse Q&A on Tweak UI 2.10

I’m going to try to alternate between programming entries (where I actually try to teach something) and random entries (where I get to spout off or go into storytelling mode). So here’s another random entry.

Why does Tweak UI put up a totally incomprehensible error message (“Cannot locate entrypoint GetDllDirectoryW in Kernel32.dll”) when I try to run it on an unsupported OS?

The scratch program

Occasionally, there is need to illustrate a point with a full program. To avoid reproducing the boring parts of the program, let’s agree on using the following template for our sample programs.
For expository purposes, I won’t use a C++ class.

Tweak UI 2.10

What are you talking about?
Tweak UI is part of the Windows XP PowerToys. It was recently updated to version 2.10.
What OS is required?
Windows XP Service Pack 1 (or higher) or Windows Server 2003 (all versions). Not supported: Windows XP RTM,

Old New Thing

In C++/CX, hat pointers are contextually convertible to bool, but you can’t always static_cast them to bool

Because C++/CX is weird like that.

Not actually crossing the airtight hatchway: Harmless out-of-bounds read that is never disclosed

There's no way to make anything bad happen, so is anything bad actually happening?

The automotive emergency kit is not a toy

Please use it only for emergencies.

When should I use delayed-marshaling when creating an agile reference?

It's a balance between doing more work now in anticipation of saving work later.

My summer vacation: The Tower of London and Kensington Palace

Doing the admissions price math.

Using contexts to return to a COM apartment later

You can go back home again.

How do you get into a context via IContext­Callback::Context­Callback?

Piggybacking on the internal infrastructure.

Setting up private COM contexts to allow yourself to unload cleanly

Your private little enclave.

Yo dawg, I hear you like COM apartments, so I put a COM apartment in your COM apartment so you can COM apartment while you COM apartment

Or maybe this is subletting? Airbnb for COM apartments?

A slightly less brief introduction to COM apartments (but it’s still brief)

Managing the multithreading.