The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Microspeak: Informing a product
Microspeak is not always about changing a word from a verb to a noun or changing a noun to a verb or even changing a noun into a verb and then back into a noun. Sometimes it's about data compression. This testing won't inform RC, but we'll need it to inform an RTM release. First, you need to familiarize yourself with a less-used sense of the verb to inform, namely to guide or direct. A typical use would be something like "This data will inform the decision whether to continue with the original plan in Product Q." In other words, this data will be used to help decide whether to continue with the origina...
Why are the Compression and Encryption options check boxes instead of radio buttons?
Tanveer Badar asks why the file properties Advanced dialog shows two checkboxes (compression and encryption) even though NTFS supports only one or the other at a time. "Why not have two radio buttons instead of these silly check boxes?" Actually, if you want radio buttons, you'd need three, one to cover the "neither" case. Let's look at what those radio buttons would look like: Compress contents to save disk space Encrypt contents to secure data Neither compress nor encrypt This takes an implementation detail (that NTFS currently does not support simultaneous compression and encryption) and elevates it to th...
Some notes on my trip to Beijing disguised as travel tips
Single-use tickets purchased from subway vending machines are valid only on the day of purchase for use in that station. Do not buy your return ticket at the same time as your outbound ticket because it will not work. This detail is clearly explained on the ticket that you receive after you have paid for it. (Also, the vending machine will ask you how many "sheets" you want. It's asking how many tickets you want.) Subway station names are printed in both Chinese and pinyin, but the pinyin omits the tone markers, which means that you will have no idea how you're supposed to pronounce the station name, should anyb...
How do I limit the size of the preview window used by Aero Snap?
A customer reported that the translucent preview shows by Aero Snap showed the wrong dimensions for their application window. "As you can see in the screen shot, the preview is too wide. Our application window has a maximum width, but the preview is fully half the width of the screen. How can we disable the Aero Snap feature?" Whoa there, giving up so easily? Sounds like you're throwing the baby out with the bathwater. To control the size of the preview window used by Aero Snap, you respond to the same message you've already been responding to in order to tell Windows the valid range of sizes for your windo...
What appears superficially to be a line is actually just a one-dimensional mob
In China, queueing is honored more in the breach than in the observance. If you see a line for something, you must understand that what you are seeing is not really a line. It is a one-dimensional mob. You must be prepared to defend your position in line fiercely, because any sign of weakness will be pounced upon, and the next thing you know, five people just cut in front of you. I first became aware of this characteristic of "Chinese queueing theory" while still at the airport. When the gate agents announced that the flight to Beijing had begun boarding, a one-dimensional mob quickly formed, and I naïvely...
We've traced the call and it's coming from inside the house: Grid lines in list view report mode
A customer wanted to know how to remove the grid lines from a list view control in report mode. The customer was kind enough to include the source code for the relevant part of the program and drew our attention to the line in the resource file that he believed to be the source of the problem: The customer didn't know it, but that line in the resource file was of no help at all in diagnosing the problem. Fortunately, we found the root cause in the source code provided: The grid lines are there because you explicitly asked for them! The customer accepted this answer without response. One of my colleagues ...
Kindergarten writing exercise from my niece
When my niece was in kindergarten, a regular classroom assignment was for students to write a few sentences about something happening in their lives. For one of the assignments, my niece wrote the following: My auntie has a baby in her tumy. If it is a boy I will call him Kevin. If it is a grl I will call her Alula. We have no idea where the name "Alula" came from. The baby turned out to be a girl, but her aunt chose a different name. My niece did not hold up her end of the bargain and call her new cousin "Alula". Update: Upon further reflection, I think the proposed boy's name was "Derik", not Kevin. Not i...
It rather involved being on the other side of this airtight hatchway: Invalid parameters from one security level crashing code at the same security level
In the category of dubious security vulnerability, I submit the following (paraphrased) report: I have discovered that if you call the function (whose first parameter is supposed to be a pointer to a IUnknown), and instead of passing a valid COM object pointer, you pass a pointer to a random hunk of data, you can trigger an access violation in the function which is exploitable by putting specially-crafted data in that memory blob. An attacker can exploit the function for remote execution and compromise the system, provided an application uses the function and passes a pointer to untrusted data as the firs...
Creative naming in pursuit of subverting the no-fun zone
For a time, the Information Technology department at Microsoft cracked down on what it believed to be frivolous mailing lists. All mailing lists inside the company had to have a valid business purpose. The nascent wireless networking team found a way to circumvent this rule: They created a mailing list for discussion of non-business topics but officially said that it was for discussing Wireless Networking Interference.