The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 30, 2015
Post comments count 0
Post likes count 1

How do I make a boldface item on a context menu?

Raymond Chen

The menu default item.

Mar 27, 2015
Post comments count 0
Post likes count 1

Flaw reported in Windows 95

Raymond Chen

And a note from Mom.

Mar 26, 2015
Post comments count 0
Post likes count 1

Switching on a tuple: Sneaky trick

Raymond Chen

Data packing.

Mar 25, 2015
Post comments count 0
Post likes count 1

What's the difference between PathIsSystemFolder and Protected Operating System Files?

Raymond Chen

The way to detect weird directories that should be excluded from the user interface is to check for the and attributes being set simultaneously. This is the mechanism used when you uncheck Hide protected operating system files in the Folder Options dialog. (Programmatically, you detect whether the user wants to see protected operating system files by checking the member of the structure.) Michael Dunn suggested using to detect these special directories, but that is not quite right. is for marking a directory as "This directory has a nondefault UI behavior attached to it. Please consult the file for mo...

Mar 24, 2015
Post comments count 0
Post likes count 0

A Venn diagram demonstrating the dining options in one of the new cafeterias

Raymond Chen

Spelling out the options.

Mar 23, 2015
Post comments count 0
Post likes count 1

CancelIoEx can cancel I/O on console input, which is kind of nice

Raymond Chen

Stop that input.

Mar 20, 2015
Post comments count 0
Post likes count 1

Finding the constructor by scanning memory for the vtable

Raymond Chen

Reversal of fortune.

Mar 18, 2015
Post comments count 0
Post likes count 1

Travel tip: Don't forget your car on the ferry

Raymond Chen

One of my colleagues lives on Bainbridge Island and has quite a long commute to work each day. From his house, he walks to the bus stop, then takes the bus to the Winslow ferry terminal, then takes the ferry to the Seattle ferry terminal, then takes the bus to Microsoft. And at the end of the day, he does the trip in reverse. One day, for whatever reason, he drove to work instead of taking the bus. He drove to the ferry terminal, took the ferry across, then drove to work. And at the end of the day, he drove to the ferry, but when the ferry arrived at its destination, he forgot that he had driven his car and wa...