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…

17

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…

34

What’s so special about the desktop window?

The window returned by GetDesktopWindow() is very special, and I see people abusing it all over the place. For example, many functions in the shell accept a window handle parameter to be used in case UI is needed. IShellFolder::EnumObjects, for example. What happens if you pass GetDesktopWindow()? If UI does indeed need to be displayed,…

26

Invalid thread and process IDs

Perhaps you want a value to use as a sentinel, which you want to be guaranteed is never a valid thread ID or process ID. What values can you use? Nothing is explicitly written about this topic, but you can put on your logic cap and figure it out. If you need an invalid thread…

21

And we will build a processor with… ONE MILLION TRANSISTORS!

A friend of mine decided to recaption this picture which is in the rotation on Intel’s Hardware Design Home Page: “And we will build a processor with… ONE MILLION TRANSISTORS!” Who knew that Dr. Evil designed CPUs, too!

14

Raymond’s comment policy

Okay, I was hoping it wasn’t going to be needed but it takes only one bad apple… Here are the ground rules. I reserve the right to edit, delete, or ignore any comment. If I edit your comment in any significant way, I promise to make that fact clear in the edit. (Exception: Broken links…

8

Why do I get a QueryInterface(IID_IMarshal) and then nothing?

A common problem when trying to get your new COM object off the ground is that you can’t seem to be able to get it created. The object comes out of the class factory, and it gets a QueryInterface for IMarshal, and then nothing. What’s going on? This is a sure sign that you didn’t…

8

Sorry the posts are late lately

Somehow the server is in a wonky state and my autopilot script that posts a new article at 7 every morning is getting error 500 back (internal server error). So I’m posting manually for the nonce. Expect erratic posting times until the problem is resolved.

11

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…

13

Why are RECTs endpoint-exclusive?

Endpoint-exclusive RECTs and lines are much easier to work with. For example, the width of a rectangle is right – left, and its height is bottom – top. If rectangles were endpoint-inclusive, then there would be annoying +1’s everywhere. End-point exclusive rectangles also scale properly. For example, suppose you have two rectangles (0,0)-(100,100) and (100,100)-(200,200)….

38