The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

Meet Deltalina, the star of Delta's new in-flight safety video

Who knew that in-flight safety videos could be so popular? Introduced to the world on the Delta blog, the latest Delta in-flight safety video has generated quite a buzz around the Internet. Well, more accurately, the buzz surrounds the video's star, flight attendant Katherine Lee, known to her drooling fans as Deltalina, with secondary attention paid to the cameo appearance of Exit Row Girl. The FlyerTalk forum is all over this topic of grave national importance, including appearances from Headphone Guy, Seat Belt Guy, and the aforementioned Exit Row Girl. I'm not sure who is in more need of a life, th...

Why do structures get tag names even if there is a typedef?

As we noted last time, structure tags are different from the typedef name as a historical artifact of earlier versions of the C language. But what about just leaving out the name entirely? One problem with this approach is that it becomes impossible to make a forward reference to this structure because it has no name. For example, if you wanted to write a prototype for a function that took one of these structures, and you could not be sure that the header file defining the type definition has already been included, you can still refer to the structure by its tag name. The two header files can be included ...

We hope you enjoyed this bus tour of Charles de Gaulle International Airport

My trip to Lisbon entailed a connection in Paris at Charles de Gaulle International Airport. So now, I've technically been to France, but since I never left the airport, I don't think it really counts. (When I mentioned to one of my colleagues that I paid a brief visit to his native country, he replied, "I hope it went okay." Off my confused expression, he continued: "I try to avoid changing planes in Paris. There is about a 30% chance that somebody will be on strike.") When our flight landed, a series of buses arrived to take the passengers to the terminal. Or at least, that's what we thought the bus was going...

Why are structure names different from their typedef names?

In Windows header files, many structures are declared like this: Why is the structure name different from typedef name? This is a holdover from very early versions of the C language where structure tags, union tags, and typedefs were kept in the same namespace. Consequently, you couldn't say . At the open brace, the compiler registers as a structure tag name, and then when appears a second time, you get a redeclaration error. The standard workaround for this was to make the structure tag name a minor modification of the typedef name, most typically by putting the word in front. The C language standardi...

Happy Waffle Day! And other holidays named after food

Today is Waffle Day in Sweden, and the reason why today of all days is Waffle Day I find quite amusing. March 25th is the Feast of The Annunciation according to the Catholic Church calendar, the day on which the archangel Gabriel announced to Mary that she would conceive a child, the Son of God. Why March 25th? The date was arrived at by the following highly scientific calculation: Ipso facto, habeas corpus delicti, we have determined the date of the Annunciation to be March 25th via incontrovertible logic. In England, the holiday is known as Lady Day, a name which is echoed Sweden, where the holiday goes by...

What's the difference between int and INT, long and LONG, etc?

When you go through Windows header files, you'll see types with names , , , and so on. What's the difference between these types and the uncapitalized ones? Well, there isn't one any more. What follows is an educated guess as to the story behind these types. The application binary interface for an operating system needs to be unambiguous. Everybody has to agree on how parameters are passed, which registers are preserved, that sort of thing. A compiler need only enforce the calling convention rules at the boundary between the application and the operating system. When a program calls another function provided b...

Buses and trams going to this place called Reservado

One thing I noticed in Lisbon is that I will occasionally see a bus or tram whose destination sign says Reservado. I couldn't find a place called Reservado anywhere in my guide book. It must be new. Hi, everybody. I'm back from vacation, and it's taken me a while to catch up on all that happened while I was away. In addition to deleting all the trackbacks from scraper blogs, I deleted two comments that could get me fired, but I left most of the off-topic discussion because it didn't appear to get too out of control. I even let stand Yuhong Bao's multiple violations of the anti-spam policy (posting multiple comm...

What’s the difference between the COM and EXE extensions?

Not much any more.

How to write like Raymond: What I tell you three times is true

Another installment in the extremely sporadic series on how to write like Raymond. On occasion, I'll find myself engaged in a mail thread with a customer who refuses to believe what they're being told and is under the impression that rephrasing the question will get a different answer. "My customer wants to control the name and appearance of the XYZ icon in the DEF dialog." — There is no public interface for manipulating that icon. "Can I change the icon's appearance?" — There is no public interface for manipulating that icon. At this point, I say to myself, "Two." And there's a nonzero chance t...