The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

When you don't speak a language, don't sound like you speak the language
Apr 30, 2012
Post comments count 0
Post likes count 0

When you don't speak a language, don't sound like you speak the language

Raymond Chen
Raymond Chen

I appreciate the help from Christoph and Voo in refining my German. But that reminds me of a story about a friend of a friend. She was in Japan to visit some friends. Although she speaks English and Mandarin fluently, she doesn't know any Japanese, so her friends taught her how to say "Sorry, I don't speak Japanese." She managed to say this sentence quite well despite learning it purely phonetically. One day they were walking down the street as a group, and a gentleman approached and asked her for directions. She responded with the only sentence she knew: "Sorry, I don't speak Japanese." The gentleman was of...

What were the tests that WinG did to evaluate video cards?
Apr 30, 2012
Post comments count 0
Post likes count 0

What were the tests that WinG did to evaluate video cards?

Raymond Chen
Raymond Chen

Georg Rottensteiner was curious about the weird things that WinG performed on installation to evaluate video cards. "What did it do actually and what for?" I don't actually know, since I was not involved in the WinG project, but I remember chatting with one of the developers who was working on video card benchmarks. He says that video card benchmarks are really hard to develop, not just because video cards are complicated, but also because video drivers cheat like a Mississippi riverboat card sharp on a boat full of blind tourists. He discovered all sorts of crazy shenanigans. Like a video driver which compa...

A process shutdown puzzle, Episode 2
Apr 27, 2012
Post comments count 0
Post likes count 0

A process shutdown puzzle, Episode 2

Raymond Chen
Raymond Chen

A customer reported that their program would very sporadically crash in the function . The customer was kind enough to provide a stack trace at the point of the crash: The customer wondered, "Could the problem be that my cleanup group does not have a callback? MSDN seems to suggest that this is okay." The exception being thrown is , but that doesn't really say much. But that's okay, because the smoking gun isn't the exception being raised. It's in the stack. Do you see it? The code is calling from inside while handling the notification. Looking further up the stack, you can see this was triggered ...

Shortcut properties are in the shortcut, so if they can read the shortcut, they can read the properties
Apr 26, 2012
Post comments count 0
Post likes count 0

Shortcut properties are in the shortcut, so if they can read the shortcut, they can read the properties

Raymond Chen
Raymond Chen

A customer wanted to know if "there was a way to hide the properties of a shortcut." We asked for an explanation of the problem they were trying to solve, so we could understand what their question meant. The customer liaison explained: The customer is insisting on this, even though I think it's really the wrong approach. They want to put a password into the parameters of a shortcut, but they don't want their employees to see the password when they right-click the shortcut and select Properties. We're trying to convince them of better ways of doing this, but right now they want to see if they can solve it by ma...

How do I prevent users from opening TIF files?
Apr 25, 2012
Post comments count 0
Post likes count 0

How do I prevent users from opening TIF files?

Raymond Chen
Raymond Chen

A customer had a question about their Windows XP installations. (This question was from several years ago, so the fine details aren't really relevant any more, but I'm actually telling this story for a commentary opportunity.) The customer wanted to disable all file associations for TIFF files. Their first attempt was by deleting and . This successfully renders TIFF files with a generic document icon, but when the user double-clicks the file, the registration is re-established and Windows Picture and Fax Viewer opens the file. The company had some strange company security policy that says that TIFF fil...

I thought I was so clever, salvaging an old floppy drive from a dead computer, but I didn't think *two* steps ahead…
Apr 24, 2012
Post comments count 0
Post likes count 0

I thought I was so clever, salvaging an old floppy drive from a dead computer, but I didn't think *two* steps ahead…

Raymond Chen
Raymond Chen

When one of the oldest computers at Microsoft still doing useful work finally died, I had the presence of mind to salvage the 5¼″ floppy drive from the machine, so that I could (someday) extract the data off all the old 5¼″ floppy discs I have packed away in boxes meaning to convert someday. (Mind you, the data capacity of a giant box of 5&frac14″ floppy disks is approximately equal to half of a CD.) Oh, and by the way, if you know what a floppy drive is, then this question on superuser.com will make you feel old. I thought I was so clever, salvaging an old floppy drive fro...

Why are programs allowed to use normal characters as hotkeys?
Apr 23, 2012
Post comments count 0
Post likes count 0

Why are programs allowed to use normal characters as hotkeys?

Raymond Chen
Raymond Chen

alv wonders why programs are allowed to create hotkeys for normal characters. The example given is the famous AltGr modifier, equivalent to Ctrl+Alt. Programs which ignore the guidance and use Ctrl+Alt as a shortcut modifier end up stealing keys from many non-English keyboard layouts, thereby preventing users from typing things like the Euro sign € (which is an AltGr combination on most keyboards that support it), or even worse, preventing Polish users with the Polish programmer keyboard layout from typing the letter Ż. Given that using Ctrl+Alt as a keyboard shortcut modifier can prevent people fro...

What does INIT_ONCE_CTX_RESERVED_BITS mean?
Apr 20, 2012
Post comments count 0
Post likes count 0

What does INIT_ONCE_CTX_RESERVED_BITS mean?

Raymond Chen
Raymond Chen

Windows Vista adds the One-Time Initialization family of functions which address a common coding pattern: I want a specific chunk of code to run exactly once, even in the face of multiple calls from different threads. There are many implementations of this pattern, such as the infamous double-checked lock. The double-checked lock is very easy to get wrong, due to memory ordering and race conditions, so the kernel folks decided to write it for you. The straightforward way of using a one-time-initialization object is to have it protect the initialization of some other object. For example, you might have it pr...

Why don't I get a Caps Lock warning balloon any more?
Apr 19, 2012
Post comments count 0
Post likes count 0

Why don't I get a Caps Lock warning balloon any more?

Raymond Chen
Raymond Chen

A customer asked for help diagnosing a problem they were experiencing on Windows XP: My customer reports that on their machines, they do not get the warning balloon that appears when Caps Lock is set while you are typing into a password field. I searched for relevant KB articles but couldn't find anything related to that. Can you help? Time for the psychic powers. My psychic powers tell me that the customer disabled all balloon tips. The customer liaison replied You are right. Thanks for the help. This is a not uncommon situation with some customers. They change a setting, and then later report tha...