The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Dec 10, 2009
Post comments count 0
Post likes count 1

Those houses are too small for anyone to live in

Raymond Chen

Not Always Right is a collection of brief stories told by people in customer service. One of my favorites is from somebody who lives on Catalina Island and had to answer the question, "What time does the island close?" Runners-up: (I've left off the punch lines so as not to spoil the surprise.) The stories have been collected into a book, The Customer Is Not Always Right: Hilarious and Horrific Tales of Customers Gone Wrong. It's almost certainly a funnier and more enjoyable read than my own book. What's more, they have a Facebook group and I don't. Maybe I should start one?

Dec 10, 2009
Post comments count 0
Post likes count 1

Only an idiot would have parameter validation, and only an idiot would not have it

Raymond Chen

The great thing about parameter validation is that there are people who say that only idiots would have it, and other people who say that only idiots wouldn't. Back in the old days, Windows didn't do parameter validation. If you called a function with an invalid window handle, your application crashed. If you called a function with an invalid pointer, your application crashed. If you called a function with an invalid bitmap handle, your application crashed. There was a lot of crashing going on. These crashes manifested themselves in the infamous Unrecoverable Application Error dialog, commonly known as the UAE...

Dec 9, 2009
Post comments count 0
Post likes count 1

What are those little overlay icons: Windows 7 edition

Raymond Chen

Some time ago, I summarized the overlay icons that come with Windows. There have been some changes in Windows 7, so I figured it'd be worth coming up with a new list. A private item is an item where the only user account with access is you.¹ You create one of these, for example, by going to the sharing wizard and saying Share with: Nobody. To avoid clutter, the overlay is shown only when there is a transition from non-private to private. (Otherwise you'd have a lock overlay on everything in your Documents folder, for example.) No longer present as an overlay is the sharing hand. Why was the sharing...

Dec 8, 2009
Post comments count 0
Post likes count 1

How do I determine the processor's cache line size?

Raymond Chen

When doing high-performance computing, you need to worry about the CPU cache line size in order to avoid issues like false sharing. But how can you determine the processor's cache size? The function will give you characteristics of the logical processors in use by the system. You can walk the returned by the function looking for entries of type . Each such entry contains a which tells you which processor(s) the entry applies to, and in the , it tells you what type of cache is being described and how big the cache line is for that cache. Windows 7 adds the function which does the filtering for you.

Dec 8, 2009
Post comments count 0
Post likes count 1

Things I've written that have amused other people: Episode 6

Raymond Chen

On an internal discussion group, somebody decided to quote one of my blog entries. Jim Medding was amused by my response: Bloggers are just idiots with a Web site. (My blog was dug up in order to refute a claim, even though the blog entry applied to a situation different from the one under discussion.)

Dec 7, 2009
Post comments count 0
Post likes count 1

I'm sorry, Brian/Bryan Gregory, that confirming the spelling of your name is too much for you to handle

Raymond Chen

At 10am on November 30, I received a telephone call at work with "Anonymous" as the caller ID. Strange. But maybe it's the same person who called my office phone from New York at 1am on the day after Thanksgiving and didn't leave a message, and they're just following up on the first business day after the holiday weekend. "Hello?" — Hello, this is Brian Gregory from Fred Asher Associates and I'm calling blah blah blah blah blah are you interested in this opportunity or know someone who is? I may have gotten the names wrong since he spoke so quickly. "I'm sorry, that was a bit fast. Your name is Brian Gr...

Dec 7, 2009
Post comments count 0
Post likes count 2

What is the story behind multimon.h?

Raymond Chen

Commenter asdf wonders what the deal is with that header file. Let's set some context. That header file was written back in the time when Windows 98 was still under development. Windows 98 was the first version of Windows to support multiple monitors. At the time, most application authors had Windows 95 as their target platform. And even after Windows 98 shipped, the expectation was that programmers would target both Windows 95 and Windows 98 for at least a little while longer. The problem then is convincing programmers to write their code in a manner that works well in the face...

Dec 4, 2009
Post comments count 0
Post likes count 1

Why do some comments have a star?

Raymond Chen

Every so often, someone posts a really funny comment, and I feel stupid just posting the remark "Haha, that was funny" or even worse "LOL". So I'm going to try giving them a star instead. Chris Blackwell wins the first star. Hopefully people won't post comments just fishing for a star. (I realize that this is a vain hope and that I will probably have to cancel the star program within the week.)

Dec 4, 2009
Post comments count 0
Post likes count 1

When there is a long line of people waiting for a shared resource, you want to investigate the person who is hogging the resource, not the people waiting in line for it

Raymond Chen

If you see a long line of people waiting for a phone booth (note: this analogy assumes you remember how phone booths work), and you want to understand the reason for the long line, do you Go to a person waiting in line and begin your investigation there? Go to the phone booth (and the person inside) and begin your investigation there? If there is a long line of people waiting for a single resource, a resource that there is not normally a long line for, you would probably look at the person who is using the resource to see if, for example, they are a chatterbox who will be on the phone for an hour, or if ...