The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Dec 25, 2012
Post comments count 0
Post likes count 1

You too can use your psychic powers: Spaces in paths

Raymond Chen

I'm going to be lazy today and make you solve the problem. Did a recent security hotfix change change the way we handle UNC paths with spaces? Normally, if we open the Run dialog and type , the folder opens. But recently it stopped working. Instead of opening the folder, we get the Open With dialog: Choose the program you want to use to open this file: File: Support Browse... OK   Cancel Can you figure out what happened recently that introduced this problem? You have all the information you need...

Dec 24, 2012
Post comments count 0
Post likes count 0

Miss Denmark, she is dressed as a mermaid because we couldn't secure the rights from LEGO

Raymond Chen

Once again, the commentary is NSFW, but once again, they so deserve it. Miss Universe 2012 National Costumes, Part 1 my favorite is the commentary for the Dominican Republic) Miss Universe 2012 National Costumes, Part 2 Miss Universe 2012 National Costumes, Part 3 (but Venezuela wins the things on top her head category) By the way, here's your dress made of LEGO. And for completeness, because I forgot to link to it last year: Miss Universe 2011 National Costumes, Part 1 Miss Universe 2011 National Costumes, Part 2

Dec 24, 2012
Post comments count 0
Post likes count 1

What is the proper handling of WM_RENDERFORMAT and WM_RENDERALLFORMATS?

Raymond Chen

Contradictory documentation.

Dec 21, 2012
Post comments count 0
Post likes count 1

Why do BackupRead and BackupWrite require synchronous file handles?

Raymond Chen

The and functions require that the handle you provide by synchronous. (In other words, that they not be opened with .) A customer submitted the following question: We have been using asynchronous file handles with the . Every so often, the call to will fail, but we discovered that as a workaround, we can just retry the operation, and it will succeed the second time. This solution has been working for years. Lately, we've been seeing crash when trying to back up files, and the stack traces in the crash dumps appear to be corrupted. The issue appears to happen only on certain networks, and the problem goes ...

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

Why do I sometimes get classic buttons and sometimes themed buttons depending on the host process?

Raymond Chen

A customer reported that their printer configuration property sheet page looked different depending on the host process. In some processes, the printer configuration dialog had the classic look of Windows 2000, but in other processes it has the themed look of Windows XP and later versions. The printer driver calls the to create the property sheet page that contains the push-button, radio-button, and other controls. We've confirmed that we call the function with the same parameters each time, but the results are different depending on which program is doing the printing. We've confirmed that both appli...

Dec 19, 2012
Post comments count 0
Post likes count 1

Why doesn't SHGetKnownFolderPath return the customized path?

Raymond Chen

A customer reported that the function was not working correctly. They moved their Videos folder to a new location, but when they called , they got the old path rather than the new one. A quick check of the code they provided showed why: Um, you're passing the flag. That flag means "Tell me where this folder would have been if its location had never been customized." Therefore, if you pass this flag, you have no right to complain that it's returning a path different from the customized path. Because passing that flag means "I don't want the customized path."

Dec 18, 2012
Post comments count 0
Post likes count 3

Why was Pinball removed from Windows Vista?

Raymond Chen

The ball became a ghost.

Dec 17, 2012
Post comments count 0
Post likes count 0

2012 års Gävlebock gick upp i brand. Igen.

Raymond Chen

The town of Gävle in Sweden erects a large straw goat every year. The Yule Goat is a Scandinavian tradition, but the Gävle goat (Gävlebocken in Swedish) is by far the most famous, or perhaps the most notorious, because it has been the center of conflict from its very beginning, and over the years since its first appearance in 1966, it has only gained more notoriety. (For something that is supposed to bring people together, it sure does a good job of dividing them.) The first conflict is between those who want the goat to last the entire season and those who want it to be lit on fire. (And anecdota...

Dec 17, 2012
Post comments count 0
Post likes count 1

Like the cake, WS_EX_TRANSPARENT is a lie, or at least not the entire truth

Raymond Chen

There is an extended window style known as . Explaining what this style does is kind of difficult, but it's been on the list of future topics since 2003. Better late than never, I guess. First of all, there are two unrelated senses of transparent in play. One is visual transparency: Pixels beneath the window can show through. The other is hit-test transparency: Do clicks on this window go to the window, or do they pass through to the window beneath? And each of those senses of transparent is itself complicated. Let's look a hit-test transparency first. We saw some time ago that It's Complicated. Different h...