The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

How do I find the original name of a hard link?
Jul 20, 2011
Post comments count 0
Post likes count 0

How do I find the original name of a hard link?

Raymond Chen
Raymond Chen

A customer asked, "Given a hardlink name, is it possible to get the original file name used to create it in the first place?" Recall that hard links create an alternate name for a file. Once that alternate name is created, there is no way to tell which is the original name and which is the new name. The new file does not have a "link back to the original"; they are both links to the underlying file content. This is an old topic, so I won't go into further detail. Though this question does illustrate that many people continue to misunderstand what hard links are. Anyway, once you figure out what the customer...

Some mailing lists come with a negative service level agreement, but that's okay, because everybody is in on the joke
Jul 19, 2011
Post comments count 0
Post likes count 0

Some mailing lists come with a negative service level agreement, but that's okay, because everybody is in on the joke

Raymond Chen
Raymond Chen

As I noted some time ago, there's a mailing list devoted to chatting among people who work in a particular cluster of buildings. It's not a technical support mailing list, but people will often ask a technical question on the off chance that somebody can help, in the same way that you might ask your friends for some help with something. Of course, one consequence of this is that the quality of the responses is highly variable. While there's a good chance that somebody will help you with your problem, there's also a good chance that a technical question will receive a highly unhelpful response just for fun, in t...

The danger of making the chk build stricter is that nobody will run it
Jul 18, 2011
Post comments count 0
Post likes count 0

The danger of making the chk build stricter is that nobody will run it

Raymond Chen
Raymond Chen

Our old pal Norman Diamond suggested that Windows should go beyond merely detecting dubious behavior on debug builds and should kill the application when it misbehaves. The thing is, if you make an operating system so strict that the slightest misstep results in lightning bolts from the sky, then nobody would run it. Back in the days of 16-bit Windows, as today, there were two builds, the so-called retail build, which had assertions disabled, and the so-called debug build, which had assertions enabled and broke into the debugger if an application did something suspicious. (This is similar to today's terms che...

Using the wrong HINSTANCE in RegisterClass is like identity theft
Jul 15, 2011
Post comments count 0
Post likes count 0

Using the wrong HINSTANCE in RegisterClass is like identity theft

Raymond Chen
Raymond Chen

Use your own account.

Photoshop meme: Mark Reynolds casually eating sunflower seeds
Jul 14, 2011
Post comments count 0
Post likes count 0

Photoshop meme: Mark Reynolds casually eating sunflower seeds

Raymond Chen
Raymond Chen

July 7, 2011: David Ortiz hits a home run against the Baltimore Orioles. As he rounds third base, Orioles third baseman Mark Reynolds casually finishes off a package of sunflower seeds (photo 6 in the slide show). An Internet meme is born. Follow the hilarity.

What is that horrible grinding noise coming from my floppy disk drive?
Jul 14, 2011
Post comments count 0
Post likes count 0

What is that horrible grinding noise coming from my floppy disk drive?

Raymond Chen
Raymond Chen

Wait, what's a floppy disk drive? For those youngsters out there, floppy disks are where we stored data before the invention of the USB earring. A single floppy disk could hold up to two seconds of CD-quality audio. This may not sound like a lot, but it was in fact pretty darned awesome, because CDs hadn't been invented yet either. Anyway, if you had a dodgy floppy disk (say, because you decided to fold it in half), you often heard a clattering sound from the floppy disk drive as it tried to salvage what data it could from the disk. What is that sound? That sound is recalibration. The floppy disk driver softw...

The tradition of giving cute names to unborn babies
Jul 13, 2011
Post comments count 0
Post likes count 0

The tradition of giving cute names to unborn babies

Raymond Chen
Raymond Chen

Many of my friends gave names to their unborn babies. Most of them were based on various objects that were the size of the adorable little parasite¹ at the time they discovered that they were pregnant: There were a few outliers, though. That last one takes a bit of explaining. Having grown tired of people asking her what she was planning on naming the baby, my friend made up an absurd name and used it with a straight face. "We're think of naming her Aubergine, if it's a girl." People would respond with a polite but confused "Oh, that's an interesting name." Then, still deadpan, she would add, "If it's...

What does the executable timestamp really mean?
Jul 13, 2011
Post comments count 0
Post likes count 0

What does the executable timestamp really mean?

Raymond Chen
Raymond Chen

A customer was looking for some information on the executable timestamp: I would like my program to display the date it was linked. The looks like what I need. Is there an easy way to retrieve this information so I don't have to parse the EXE header myself? Also, what functions exist for formatting this timestamp into something human-readable? The customer didn't explain why they needed this information, but presumably it was for diagnostic purposes. For example, the program might display the information in the About box to help the product support team identify which version of the program the end-user is ru...

At least it'll be easy to write up the security violation report
Jul 12, 2011
Post comments count 0
Post likes count 0

At least it'll be easy to write up the security violation report

Raymond Chen
Raymond Chen

Many years ago, Microsoft instituted a new security policy at the main campus: all employees must visibly wear their identification badge, even when working in their office. As is customary with with nearly all new security policies, it was met with resistance. One of my colleagues was working late, and his concentration was interrupted by a member of the corporate security staff at his door. — Sir, can I see your cardkey? My colleague was not in a good mood (I guess it was a nasty bug), so he curtly replied, "No. I'm busy." — Sir, you have to show me your cardkey. It's part of the new security po...