The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Nov 20, 2012
Post comments count 0
Post likes count 1

Microspeak: touch base

Raymond Chen

The verb phrase touch base is in general business jargon use, but it's quite popular at Microsoft. To touch base with someone is to contact someone in a lightweight and mostly-informal sort of way. In other words, it takes the form of a piece of email or a brief office visit rather than a formal meeting with an agenda. Bob, can you touch base with the Nosebleed team to verify that this design change won't affect them? Bob is expected to contact a representative from the Nosebleed team, either by sending email, or by telephone, or by stopping by their office for a quick chat. If Bob sets up a one-hour meeting...

Nov 19, 2012
Post comments count 0
Post likes count 0

Raymond's podcast list (for 2011, at least)

Raymond Chen

Ry Jones wants to know what other podcasts I subscribe to. Remember, I wrote this back in 2011. Here's what I listen to. Note that I am not averse to fast-forwarding over parts that don't interest me, such as when they discuss a movie that I simply don't care about.

Nov 16, 2012
Post comments count 0
Post likes count 1

How do I forward an exported function to an ordinal in another DLL?

Raymond Chen

The syntax for specifying that requests to import a function from your DLL should be forwarded to another DLL is This says that if somebody tries to call from , they are really calling in . This forwarding is done in the loader. Normally, when a client links to the function , the loader says, "Okay, let me get the address of the function in and store it into the variable." It's the logical equivalent of When you use a forwarder, the loader sees the forwarder entry and says, "Whoa, I'm not actually supposed to get the function from at all! I'm supposed to get the function from !" So it loads and g...

Nov 15, 2012
Post comments count 0
Post likes count 1

If you're going to write your own allocator, you need to respect the MEMORY_ALLOCATION_ALIGNMENT

Raymond Chen

This time, I'm not going to set up a story. I'm just going to go straight to the punch line. A customer overrode the operator in order to add additional instrumentation. Something like this: This worked out okay on 32-bit systems because in 32-bit Windows, is 8, and is also 8. If you start with a value that is a multiple of 8, then add 8 to it, the result is still a multiple of 8, so the pointer returned by the custom remains properly aligned. But on 64-bit systems, things went awry. On 64-bit systems, is 16, As a result, the custom handed out guaranteed-misaligned memory. The misalignment went u...

Nov 14, 2012
Post comments count 0
Post likes count 1

Break it up, you two!: The zero width non-joiner

Raymond Chen

Preventing characters from combining.

Nov 13, 2012
Post comments count 0
Post likes count 1

Microsoft Money crashes during import of account transactions or when changing a payee of a downloaded transaction

Raymond Chen

Update: An official fix for this issue has been released to Windows Update, although I must say that I think my patch has more style than the official one. You do not need to patch your binary. Just keep your copy of Windows 8 up to date and you'll be fine. For the five remaining Microsoft Money holdouts (meekly raises hand), here's a patch for a crashing bug during import of account transactions or when changing a payee of a downloaded transaction in Microsoft Money Sunset Deluxe. Patch the mnyob99.dll file as follows: File offset 003FACE8: Change 85 to 8D File offset 003FACED: Change 50 to 51 File of...

Nov 12, 2012
Post comments count 0
Post likes count 1

Frequentists vs Bayesians

Raymond Chen

But, I mean, c'mon. Frequentists vs Bayesians? Worst. Action. Movie. Ever.

Nov 12, 2012
Post comments count 0
Post likes count 1

Why are taskbar live previews lost when you use Fast User Switching?

Raymond Chen

Anonymous asks a metric buttload of questions, which means that I feel compelled to answer all or none. And given the choice, I decided to answer none. Okay, I will answer one and ignore the rest. Why are taskbar live previews lost when you use Fast User Switching? When you switch away from a user via Fast User Switching, the Desktop Window Manager for that session is turned off. After all, since that session no longer has access to the screen, there's no point running all this code and consuming all this memory for something nobody can see. When the Desktop Window Manager restarts upon reactivation of a ses...

Nov 9, 2012
Post comments count 0
Post likes count 1

Thread affinity of user interface objects: Addendum

Raymond Chen

Some time ago, I discussed the thread affinity of device contexts, noting that the and functions must be called from the same thread. The same restriction also applies to printer DCs. Printer DCs must be created and destroyed on the same thread. The printing team imposed this additional rule in order to make it easier for printer driver vendors to author their drivers. (Printer driver developers have a habit of calling in their implementation of and in their implementation of .) Given that printer drivers are a third-party extension point, it's probably in your best interest to treat printer DCs as havin...