The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Aug 9, 2006
Post comments count 0
Post likes count 0

How were window hooks implemented in 16-bit Windows?

Raymond Chen

The mechanism for keeping track of window hooks was very different in 16-bit Windows. The functions involved were , and . The first two functions still exist today, but the third one has been replaced with a macro: Disclaimer: All code below is "reconstructed from memory". The spirit of the code is intact, but the precise details may be off. To install a windows hook in 16-bit Windows, you started by calling : The return value from must be saved in a global variable, which we gave the somewhat provocative name . The hook procedure itself went something like this: And then when you were finished, you...

Aug 8, 2006
Post comments count 0
Post likes count 0

A look inside WinInet's index.dat file and changes in IE7 and Vista

Raymond Chen

My frequent bicycling buddy Ari Pernick wrote a couple of articles over on the Windows Network Development blog on the topic of the file, which appears to have gotten a bit of attention lately. This past weekend, I joined Ari and another friend in a ride along the Upper Loop of the annual Tour De Peaks bicycle ride. I'd never done this ride before; I tend to do the same routes over and over. This doesn't bother me like it does other people. We had originally planned to do both the Upper and Lower loops (50km each for a total of 100km), and Ari chatted with one of the ride organizers about the characteristic...

Aug 8, 2006
Post comments count 0
Post likes count 0

Candidate for most obscure keyboard shortcut: Shift+F8

Raymond Chen

One of the most obscure keyboard shortcuts has got to be Shift+F8, which is used for listbox discontiguous extended selection. Man, what a mouthful. KB article Q301583 doesn't help matters by listing this keyboard shortcut under "Dialog box keyboard shortcuts" even though it isn't a dialog box keyboard shortcut. It's a listbox keyboard shortcut. If the listbox supports extended selections (via ), then you can use the Shift+F8 shortcut to create discontiguous multiple selections from the keyboard. (Via the mouse, you can just Ctrl+Click to create a discontiguous multiple selection.) Type Shift+F8 once to enter e...

Aug 7, 2006
Post comments count 0
Post likes count 0

Even more about C# anonymous methods, from the source

Raymond Chen

If you want to know still more about C# anonymous methods, you can check out the web site of Grant Richins who has an entire category devoted to anonymous methods, and he should know, since he actually implemented them. Now that CLR week is over, I'm curious what you all thought of it. Would you like to see another CLR week at some point? Should I stick to Win32? (Or doesn't it matter because I'm an arrogant Microsoft apologist either way?)

Aug 7, 2006
Post comments count 0
Post likes count 0

The day Tully's ran out of coffee

Raymond Chen

Today, Tully's coffee shops begin offering free Wi-Fi (in shops where Wi-Fi is available). Tully's isn't as widespread as Starbucks, but it's the best of the major chain coffee shops in the Seattle area, according to a highly unscientific poll of my friends. Seeing Tully's name back in the news reminded me of an incident that occurred to one of my colleagues, who went into the local Tully's one evening and asked for a cup of drip coffee. The Tully's employee went to the pot, then turned around and said, "Actually, we don't have any coffee." My colleague did get a profuse apology from the district manager, who ...

Aug 4, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 3)

Raymond Chen

How local variables are captured.

Aug 3, 2006
Post comments count 0
Post likes count 0

News Flash: Big houses also cost more to cool

Raymond Chen

Perhaps as a counterpart to the fact that big houses have bigger heating bills, NPR yesterday pointed out that bigger houses use more electricity for cooling. (NPR looks not at the "surprise" of big-house owners over the cost of energy, but rather the consequences of these big houses on the energy grid. But the headline was hard to pass up.)

Aug 3, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 2)

Raymond Chen

When the anonymous class becomes visible.

Aug 2, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 1)

Raymond Chen

First we'll look at how they're implemented.