The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
A question about endian-ness turns out to be the wrong question
Via a customer liaison, we received what seemed like a simple question: "How can I detect whether a Windows machine is big-endian or little-endian?" You could actually answer this question (say by coughing up a code fragment that stores a 16-bit value to memory and then takes it apart into bytes to see how it got stored, or by simply hard-coding it based on the target architecture you are compiling for), but you'd be making the mistake of answering the question instead of solving the problem. The customer liaison explained, "My customer is having a problem that is caused by a bug in the SAP BI connector. Accor...
You too can use your psychic powers: Spaces in paths
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...
Miss Denmark, she is dressed as a mermaid because we couldn't secure the rights from LEGO
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
What is the proper handling of WM_RENDERFORMAT and WM_RENDERALLFORMATS?
Contradictory documentation.
Why do BackupRead and BackupWrite require synchronous file handles?
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 ...
Why do I sometimes get classic buttons and sometimes themed buttons depending on the host process?
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...
Why doesn't SHGetKnownFolderPath return the customized path?
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."
Why was Pinball removed from Windows Vista?
The ball became a ghost.
2012 års Gävlebock gick upp i brand. Igen.
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...