The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 12, 2014
Post comments count 0
Post likes count 1

Operations jargon: Internet egress

Raymond Chen

As I've noted before, the operations team has their own jargon which superficially resembles English. Some time ago, they sent out a message with the subject A New Internet Egress Path Is Coming. Translation: We're changing the way computers access the Internet. Bonus jargon: traffic on the edge. This does not refer to traffic that is on the verge of a nervous breakdown. It merely refers to traffic that crosses the boundary between intranet and Internet.

Mar 11, 2014
Post comments count 0
Post likes count 1

On live performances of Star Trek

Raymond Chen

Spock's Brain is generally considered to be the worst episode of Star Trek. That may be why in 2009 Mike Carano decided to perform it as a theatrical production. Here is the opening scene, and here's Carano talking about the show's genesis. In the second video, skip ahead to 2:40 to see more clips from the show, or go to 4:35 for the fight scene. Whereas Carano played the show for laughs, the folks at Atomic Arts in Portland (yes, that Portland) played it straight for their Trek in the Park series, but they still get laughs because Star Trek. And yes, when the Enterprise is hit, everybody jerks to the lef...

Mar 11, 2014
Post comments count 0
Post likes count 2

How do I disable zone markers for downloaded files, so that Explorer stops being a nag about running downloaded files and just trusts me to do the right thing?

Raymond Chen

My Little Program about manipulating the zone identifier for downloaded files appears to have struck a nerve with commenter Tess, who launched into some sort of diatribe about how Microsoft should stop being a busybody and warning users about opening files that they downloaded. You are welcome to disable the feature if it offends you so. In the Group Policy editor, go to User Configuration, Administrative Templates, Windows Components, Attachment Manager, and enable Do not preserve zone information in file attachments. For bonus points, you can set a bunch of other policies to make your computer even more dan...

Mar 10, 2014
Post comments count 0
Post likes count 0

Why Johnny can't read music

Raymond Chen

In the book He Bear, She Bear, the musical instrument identified as a tuba is clearly a sousaphone. (For those who are wondering what the title has to do with the topic of musical instrument identification: It's a reference to the classic book Why Johnny Can't Read.)

Mar 10, 2014
Post comments count 0
Post likes count 1

Programmatically uploading a file to an FTP site

Raymond Chen

Today's Little Program uploads a file to an FTP site in binary mode with the assistance of the Wininet library. This program has sat in my bag of tools for years. The program accepts five command line arguments: site (no "ftp://" in front) userid password path for the file to upload location to place the uploaded file For example, I might say ftpput ftp.contoso.com admin seinfeld newversion.zip subdir/newversion.zip

Mar 7, 2014
Post comments count 0
Post likes count 1

Converting from a UTC-based SYSTEMTIME directly to a local-time-based SYSTEMTIME

Raymond Chen

Last year, I presented this commutative diagram A 2-by-2 grid of boxes. The top row is labeled FILE­TIME; the bottom row is labeled SYSTEM­TIME. The first column is labeled UTC; the second column is labeled Local. The upper left box is labeled Get­System­Time­As­File­Time. There is an outgoing arrow to the right labeled File­Time­To­Local­File­Time leading to the box in the second column labeled None. There is an outgoing arrow downward labeled File­Time­To­System­Time leading to the box in the second row, first column, ...

Mar 6, 2014
Post comments count 0
Post likes count 2

We’re currently using FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH, but we would like our WriteFile to go even faster

Raymond Chen

Actually, those flags make it go slower.

Mar 5, 2014
Post comments count 0
Post likes count 1

Why do I have to add 1 to the color index when I set it as the hbrBackground of a window class?

Raymond Chen

Our scratch program sets the background color to by setting the class background brush as follows: What's with the ? Okay, first of all, let's backtrack a bit. The real first question is, "What's the deal with taking an integer () and casting it to a and expecting anything sane to happen?" The window manager wants to provide multiple ways of setting the class background brush. The application can request that no automatic background drawing should occur at all. The application can request custom background drawing and provide that custom drawing by handling the message. The application...

Mar 4, 2014
Post comments count 0
Post likes count 1

What order does the DIR command arrange files if no sort order is specified?

Raymond Chen

Whatever order it likes.