The Old New Thing

How are DLL functions exported in 32-bit Windows?

The designers of 32-bit Windows didn't have to worry quite so much about squeezing everything into 256KB of memory. Since modules in Win32 are based on demand-paging, all you have to do is map the entire image into memory and then run around accessing the parts you need. There is no distinction between resident and non-resident names; the ...

The day the peloton lost its way

It's the one time a year that more than fifty people in the United States actually give a hoot about bicycle racing. Yes, it's the Tour de France. (Follow the racers live via GPS!) But this story isn't about the Tour. It's about Stage 4 of the 2005 ENECO Tour. You can follow along with the live report. Everything was going pretty much ...

How were DLL functions exported in 16-bit Windows?

The whole point of dynamic link libraries (DLLs) is that the linkage is dynamic. Whereas statically-linked libraries are built into the final product, a module that uses a dynamically-linked library merely says, "I would like function X from Y.DLL, please." This technique has advantages and disadvantages. One advantage is more efficient use of...

Glass houses are great places to throw stones

Whenever I write an article explaining that programs should avoid doing X, I can confidently rely on a comment saying, "Well, Microsoft Product Q does this!" as if to say, "Gotcha, you hypocrite!" But they're saying "gotcha" to the wrong person. Because, and I'm sure it's a shock to many people to read this, I did not ...

Win $5000 every summer for life (some restrictions on your life apply)

Back in 2003, M&M offered a chance to win $5000 every summer for life, but if you looked more carefully, the offer actually read, "Win $5000 Every Summer For Life*", and the asterisk at the bottom read, "Maximum 50 years". That fine print was filled with strange stuff. For example, 3. Sponsor responsible only for delivery of prize; not ...

Pidls and monikers do roughly the same thing, just backwards

When operating with the Windows shell, you will almost certainly find yourself at some point working with a pointer to an item ID list, known also as a "pidl" (rhymes with "middle"). On the other hand, when working with OLE you may find yourself having do deal with monikers. In a sense, they both do the same thing. They let you refer to some ...

Not everybody with a non-Windows partition type is a geek

In the discussions following why Windows setup lays down a new boot sector, some commenters suggested that Windows setup could detect the presence of a non-Windows partition as a sign that the machine onto which the operating system is being installed belongs to a geek. In that way, the typical consumer would be spared from having to deal ...

Wenn Ausländer Deutsch phonetisch singen

When foreigners sing German phonetically, the results are kind of painful. Listen, if you dare, to Johnny Cash sing "Wer kennt den Weg? (I Walk the Line)" [WMV] [Real]. If you can't get enough, you can grab the lyrics and sing along. Listening to the recording brought back painful memories of my high school German class, where there were ...