The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

PE resources must be 4-byte aligned, but that doesn't stop people from trying other alignments
Jun 9, 2011
Post comments count 0
Post likes count 0

PE resources must be 4-byte aligned, but that doesn't stop people from trying other alignments

Raymond Chen
Raymond Chen

Resources in PE-format files must be stored at offsets which are a multiple of four. This requirement is necessary for platforms which are sensitive to data alignment. That doesn't stop people from breaking the rules anyway. After all, it sort of works anyway, as long as you're careful. I mean, sure maybe if somebody running a non-x86 version of Windows tries to read your resources, they will crash, but who uses non-x86 versions of Windows, right? In Windows Vista SP1, additional hardening was added to the resource parsing code to address various security issues, but the one that's important today is that ...

Microspeak: The planned unplanned outage, and other operations jargon
Jun 8, 2011
Post comments count 0
Post likes count 0

Microspeak: The planned unplanned outage, and other operations jargon

Raymond Chen
Raymond Chen

The Operations group at Microsoft manage the servers which keep the company running. And they have their own jargon which is puzzling to those of us who don't spend all our days in a noisy server room. From what I can gather, an Unplanned Outage would be better termed an Unscheduled Outage: We did not have it marked off on our calendar that the server would be unavailable at this time, but it ended up that way. These unscheduled outages fall into two categories: An Unplanned Unplanned Outage is an unscheduled outage that took place of its own volition. In other words, the server crashed or somebody accidentall...

You'd think that with the name scratch, people wouldn't expect it to be around for a long time
Jun 7, 2011
Post comments count 0
Post likes count 0

You'd think that with the name scratch, people wouldn't expect it to be around for a long time

Raymond Chen
Raymond Chen

There is a server run by the Windows team called . Its purpose is to act as a file server for storing files temporarily. For example, if you want to send somebody a crash dump, you can copy it to the scratch server and send the person a link. The file server is never backed up and is not designed to be used as a permanent solution for anything. The Windows team likes to use the server to test various file server features. For example, the scratch server uses hierarchical storage management and migrates files to tape relatively aggressively, so that the HSM development team can get real-world usage of their fea...

Why do Group Policy settings require me to have a degree in philosophy?
Jun 6, 2011
Post comments count 0
Post likes count 0

Why do Group Policy settings require me to have a degree in philosophy?

Raymond Chen
Raymond Chen

Commenter Josh points out that Group Policy settings often employ double-negatives (and what's the difference between turning something off and not configuring it)? Group Policy settings are unusual in that they are there to modify behavior that would continue to exist without them. They aren't part of the behavior but rather a follow-on. Suppose that the default behavior is to do XYZ automatically, but due to requests from corporate customers, a Group Policy is added to alter this behavior. The Group Policy for this might look like this: Don't do XYZ automatically Enabled Disabled Not configured The t...

Swamping the thread pool with work faster than it can drain
Jun 3, 2011
Post comments count 0
Post likes count 0

Swamping the thread pool with work faster than it can drain

Raymond Chen
Raymond Chen

This scenarios is real, but details have been changed to protect the guilty. Consider a window showing the top of a multi-page document. The developers found that when the user clicks the down-arrow button on the scroll bar, the program locks up for 45 seconds, over a dozen threads are created, and then suddenly everything clears up and the window displays the final paragraph of the document (i.e., it scrolled all the way to the bottom). The problem was traced to queueing tasks to the thread pool faster than they can drain. The document is an object which, unlike a window, has no thread affinity. (Naturall...

How do I control X-Mouse settings (active window tracking)?
Jun 2, 2011
Post comments count 0
Post likes count 0

How do I control X-Mouse settings (active window tracking)?

Raymond Chen
Raymond Chen

For quite some time, Windows has had a setting officially called active window tracking but which informally goes by the name X-Mouse, because that was the name of the PowerToy which first exposed the feature. (The PowerToy was in turn so-named because it made the mouse behave in a manner similar to many X window managers.) The setting is exposed to end users in Windows 7 on Make the mouse easier to use under Activate a window by hovering over it with the mouse. If you want to write your own PowerToy to control this setting, you can do so by calling the function. There are three settings which collective...

How do I prevent users from pinning my program to the taskbar?
Jun 1, 2011
Post comments count 0
Post likes count 0

How do I prevent users from pinning my program to the taskbar?

Raymond Chen
Raymond Chen

A customer wanted to prevent users from pinning their application to the taskbar. I have an application that is launched as a helper by a main application. Users shouldn't be launching it directly, but rather should be launching the main application. But since the helper shows up in the taskbar, users may be tempted to right-click on the taskbar icon and select "Pin to taskbar." Unfortunately, this pins the helper program to the taskbar instead of the main application, and launching the helper program directly doesn't work. Is there a way I can prevent users from pinning the helper program? It so happens tha...

My evil essence revealed
May 31, 2011
Post comments count 0
Post likes count 0

My evil essence revealed

Raymond Chen
Raymond Chen

I found it amusing that somebody considered the fact that Microsoft employees can read my queued-up blog entries before the articles are published to be further evidence of Microsoft's evil essence as a monopoly. Just for the record, this is not evidence of Microsoft's evil essence as a monopoly. Rather, it's evidence of Raymond's evil essence as a monopoly, because the monopoly on blog articles written by Raymond Chen that haven't yet been published belongs to me.

Just for fun: Sample user names in Windows 7
May 30, 2011
Post comments count 0
Post likes count 0

Just for fun: Sample user names in Windows 7

Raymond Chen
Raymond Chen

Names from around the world.