The Old New Thing

On a server, paging = death

Chris Brumme's latest treatise contained the sentence "Servers must not page". That's because on a server, paging = death. I had occasion to meet somebody from another division who told me this little story: They had a server that went into thrashing death every 10 hours, like clockwork, and had to be rebooted. To mask the problem, the server ...

Why do text files end in Ctrl+Z?

Actually, text files don't need to end in Ctrl+Z, but the convention persists in certain circles. (Though, fortunately, those circles are awfully small nowadays.) This story requires us to go back to CP/M, the operating system that MS-DOS envisioned itself as a successor to. (Since the 8086 envisioned itself as the successor to the 8080...

Why are dialog boxes initially created hidden?

You may not have noticed it until you looked closely, but dialog boxes are actually created hidden initially, even if you specify WS_VISIBLE in the template. The reason for this is historical. Rewind back to the old days (we're talking Windows 1.0), graphics cards are slow and CPUs are slow and memory is slow. You can pick a menu ...

Why do operations on "byte" result in "int"?

(The following discussion applies equally to C/C++/C#, so I'll use C#, since I talk about it so rarely.) People complain that the following code elicits a warning: "The result of an operation on 'byte' should be another 'byte', not an 'int'," they claim. Be careful what you ask for. You might not like it. Suppose we lived in a fantasy ...

Defrauding the WHQL driver certification process

In a comment to one of my earlier entries, someone mentioned a driver that bluescreened under normal conditions, but once you enabled the Driver Verifier (to try to catch the driver doing whatever bad thing it was doing), the problem went away. Another commenter bemoaned that WHQL certification didn't seem to improve the quality of ...

Why are HANDLE return values so inconsistent?

If you look at the various functions that return s, you'll see that some of them return (like ) and some of them return (like ). You have to check the documentation to see what each particular function returns on failure. Why are the return values so inconsistent? The reasons, as you may suspect, are historical. The values were chosen to...

Why 16-bit DOS and Windows are still with us

Many people are calling for the abandonment of 16-bit DOS and 16-bit Windows compatibility subsystems. And trust me, when it comes time to pull the plug, I'll be fighting to be the one to throw the lever. (How's that for a mixed metaphor.) But that time is not yet here. You see, folks over in the Setup and Deployment group have gone and...

Why do timestamps change when I copy files to a floppy?

Floppy disks use the FAT filesystem, as do DOS-based and Windows 95-based operating systems. On the other hand, Windows NT-based systems (Windows 2000, XP, 2003, ...) tend to use the NTFS filesystem. (Although you can format a drive as FAT on Windows NT-based systems, it is not the default option.) The NTFS and FAT filesystems store ...

Why can't I put hotlinks in notification icon balloon tips?

The short answer: "Because there is no NIF_PARSELINKS flag." The long answer: When balloon tips were first developed, there was no ability to embed links. Consequently, programs were free to put insecure text in balloon tips, since there was no risk that they would become "live". So, for example, a virus scanner might say "The document 'XYZ...

No code is an island

Norman Diamond noted in a comment that on Windows 2003 Server, the Display Adapter Troubleshooting slider still lists "full acceleration" as the recommended setting even though the default for Server is "full minus one". This is one of those "Oh, that's an easy change" bugs. The discussion probably went like this: Some guy whose idea ...