The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

If only he'd known to offer to back up their PC instead
Oct 3, 2006
Post comments count 0
Post likes count 0

If only he'd known to offer to back up their PC instead

Raymond Chen
Raymond Chen

I love it when two unrelated stories conspire to create amusement beyond what each one provided separately. We start with this report from BoingBoing of a man on Craigslist who offered to perform computer maintenance and repair in exchange for second base. (For those not familar with North American high school sexual slang—and that includes me—I refer you to this schedule of bases on Wikipedia, accompanied by a disturbingly elaborate list of secondary metaphors.) That story provided momentary amusement, but it was subsequently recalled by this unrelated story of a man who was ruled to have been overch...

There's a reason why envelopes have backs
Oct 3, 2006
Post comments count 0
Post likes count 0

There's a reason why envelopes have backs

Raymond Chen
Raymond Chen

For some reason, people are upset that I don't have hard data for the cost difference between "slow" and "fast" mode enumeration. I already did a back-of-the-envelope calculation that showed that fast mode reduces the total time to enumerate the items in a folder from five minutes to two seconds. That's what's so great about back-of-the-envelope calculations: They let you make decisions without actually having to implement every possible solution. Some quick estimation shows that using slow mode enumeration would be 200 times slower than fast mode. Does it really matter whether the speed-up is 195.1231 times or e...

Any similarity to actual German or Swedish words is purely coincidental
Oct 2, 2006
Post comments count 0
Post likes count 0

Any similarity to actual German or Swedish words is purely coincidental

Raymond Chen
Raymond Chen

Earlier this year, the Advertising Standards Authority (the UK's advertising watchdog) ruled that the use of umlauts in the name of kitchen furniture manufacturer Möben is purely decorative and not intended to mislead consumers into believing that the company is German or Scandinavian. The fact that the name is only one letter away from both the German word ("Möbel") and Swedish word ("möbel") for "furniture" is not intended to mislead but rather is simply a coincidence. This appears to be a variation of the heavy metal umlaut. (Not to be confused with a diaeresis. I used to use diaereses, but ...

Does a dual-core processor count as one or two for licensing purposes?
Oct 2, 2006
Post comments count 0
Post likes count 0

Does a dual-core processor count as one or two for licensing purposes?

Raymond Chen
Raymond Chen

Now that dual-core processors are gaining in popularity, there has been some confusion over whether a dual-core processor counts as one or two. This discussion of multicore processor licensing may clear things up. The short answer is that a dual-core processor still counts as one processor. For example, Windows XP Professional supports up to two processors. If you have two dual-core processors, Windows XP will use them both, for a total of four processing units. And if you enable hyperthreading on those processors, you get eight virtual processors out of the deal! Similarly, Windows XP Home supports one process...

Eating Belgian food at Brouwer's Cafe in Fremont
Sep 29, 2006
Post comments count 0
Post likes count 0

Eating Belgian food at Brouwer's Cafe in Fremont

Raymond Chen
Raymond Chen

Last year, some friends and I went for dinner at Brouwer's Café, a Belgian pub/restaurant in the Fremont neighborhood of Seattle. The menu is pub food, which means that everything comes with frites and a choice of several dipping sauces, none of which is ketchup. One of my friends spent some formative years of her life in the Netherlands, so she was familiar with frites and asked for curry ketchup. Unfortunately, they didn't have it. (But I know a great German deli that does carry curry ketchup...) I tried to stay somewhat healthy with a salad, but the croque monsieur pretty much cancelled out any fat-...

Quotation marks around spaces aren't necessary in the PATH environment variable
Sep 29, 2006
Post comments count 0
Post likes count 0

Quotation marks around spaces aren't necessary in the PATH environment variable

Raymond Chen
Raymond Chen

The purpose of quotation marks is to allow a character that would normally be interpreted as a delimiter to be included as part of a file name. Most of the time, this delimiter is the space. The function uses a space to separate the program name from its arguments. Most programs separate their command line arguments with a space. But the environment variable doesn't use spaces to separate directories. It uses semicolons. This means that if you want to add a directory with spaces in its name to the path, you don't need quotation marks since spaces mean nothing to the environment variable. The quotation marks d...

When you crash, make sure you crash in the right place
Sep 28, 2006
Post comments count 0
Post likes count 0

When you crash, make sure you crash in the right place

Raymond Chen
Raymond Chen

Last time, I recommended that functions should just crash when given invalid pointers. There's a subtlety to this advice, however, and that's making sure you crash in the right place. If your function and your function's caller both reside on the same side of a security boundary, then go ahead and crash inside your function. If the caller is a bad guy who is trying to get your function to crash, then there's nothing the caller has accomplished if your function runs in the same security context as the caller. After all, if the caller wanted to make your program do something bad, it could've just done that bad thi...

Saturday is Museum Day, courtesy of Smithsonian Magazine
Sep 28, 2006
Post comments count 0
Post likes count 0

Saturday is Museum Day, courtesy of Smithsonian Magazine

Raymond Chen
Raymond Chen

September 30, 2006 is the first Museum Day open to the general public. (Apparently, previous Museum Days were limited to subscribers of Smithsonian Magazine.) You will have to print out the Museum Day Admissions Coupon to get in. Some restrictions apply. Read the fine print. Even the Institute for Creation Research (an actual museum!) is getting into the act.

IsBadXxxPtr should really be called CrashProgramRandomly
Sep 27, 2006
Post comments count 0
Post likes count 0

IsBadXxxPtr should really be called CrashProgramRandomly

Raymond Chen
Raymond Chen

Masking a bug just creates a different, harder-to-find, bug.