The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Bonus chatter about that virus that is responsible for the top six Explorer crashes
Jun 5, 2009
Post comments count 0
Post likes count 0

Bonus chatter about that virus that is responsible for the top six Explorer crashes

Raymond Chen
Raymond Chen

Last year, I wrote about a virus that is responsible for the top six Explorer crashes, by a wide margin. I learned later how the authors of this XYZ Virus operate, and it happens to answer a question posted by commenter SteveL as to why these virus writers are so incompetent that they crash so much. First, the virus authors infect your computer and crash your system every so often on purpose. Meanwhile, they also set up a legitimate-looking Web site which sells anti-virus software that claims to remove this virus. You send them your money, they send you the software. The kicker is that the removal softw...

Cool guys don’t look at explosions
Jun 4, 2009
Post comments count 0
Post likes count 0

Cool guys don’t look at explosions

Raymond Chen
Raymond Chen

Thanks to NPR's Monkey See blog for finding this:

Why can’t I rotate the display with ChangeDisplaySettingsEx?
Jun 4, 2009
Post comments count 0
Post likes count 0

Why can’t I rotate the display with ChangeDisplaySettingsEx?

Raymond Chen
Raymond Chen

If you have one of those cool swively LCD displays (or if you decided to build your own), you naturally want to tell your video card to display rotated output, so you can take advantage of the portrait orientation. And naturally you would think that calling the and using the field of the structure would do the trick. And then you would find that it doesn't work. Yet the annoying utility program (which gets shoveled onto your computer when you install the driver) can rotate the video output. How come they can do it, but can't? Because the video card vendor decided to do it in a nonstandard way so that...

Last tube standing: The Cardboard Tube Fighting League
Jun 3, 2009
Post comments count 0
Post likes count 0

Last tube standing: The Cardboard Tube Fighting League

Raymond Chen
Raymond Chen

Dodge, parry, thrust. Welcome to the Cardboard Tube Fighting League. (I happened to be in Gasworks Park for a totally unrelated reason and managed to catch the final battle of the Seattle branch's 2008 Tournament.)

What does the “Zw” prefix mean?
Jun 3, 2009
Post comments count 0
Post likes count 0

What does the “Zw” prefix mean?

Raymond Chen
Raymond Chen

If you spend time in kernel mode, you're accustomed to seeing functions with two-letter (or occasionally, three-letter) prefixes that indicate which component they belong to. What does the "Zw" mean? Answer: Nothing. The people who chose the letters wanted to pick something that was unlikely to collide with anything. Perhaps they had a prior bad experience with having chosen a prefix, only to find that somebody ahead of them claimed it already?

Spam trackback attack returns, it’s not a matter of whether but how much
Jun 2, 2009
Post comments count 0
Post likes count 0

Spam trackback attack returns, it’s not a matter of whether but how much

Raymond Chen
Raymond Chen

Like microsoft.com, the question isn't whether blogs.msdn.com site is under attack but rather how bad the attack is right now. There are a number of regular culprits, like , , , but those sites tend to focus on the most recent few articles. A new category of trackback spammer is here: The I'm going to scrape your entire site and create a trackback for every article trackback spammer. I'm pretty sure this will continue for at least the next week. I think I'm going to have to write a script that auto-deletes all these bogus trackbacks.

Who you calling boring?
Jun 2, 2009
Post comments count 0
Post likes count 0

Who you calling boring?

Raymond Chen
Raymond Chen

A notice was sent out by the real estate department with the provocative subject line Campus notification — Building 7: Marking Boring Locations. What? Were the people in the real estate department saying that the people who work in Building 7 need to get some new hobbies? Or maybe they were just going to put up markers like you see in historic districts, but the markers are going to say something like On this spot in 1998, absolutely nothing interesting happened. But no, that's not what the message was about. It was announcing that, in preparation for an expansion of the parking garage, the...

Whew, I’m not doing *that* again!
Jun 1, 2009
Post comments count 0
Post likes count 0

Whew, I’m not doing *that* again!

Raymond Chen
Raymond Chen

When I met Sara Ford at the 2008 PDC, I got to talk to her author-a-author. I asked her how the book-writing experience was. "I'm never doing that again!" she replied. Yeah, that's pretty much how I feel about it, too. Steve Makofsky agrees. (Though, to be fair, what Sara was not going to do was write a book in three months, as opposed to swearing off writing books entirely.) By the way, my book is now available in Chinese. I don't get any royalties when people buy a translated copy, so buy it or not, I don't care. Actually, I make barely any money from the book at all. During one six-month period, I ...

Why does the CreateProcess function modify its input command line?
Jun 1, 2009
Post comments count 0
Post likes count 0

Why does the CreateProcess function modify its input command line?

Raymond Chen
Raymond Chen

One of the nasty gotchas of the function is that the parameter must be a mutable pointer. If you pass a pointer to memory that cannot be written to (for example, a pointer to a page that is marked ), then you might crash. Commenter Ritchie wonders why this parameter is so weird. Basically, somebody back in the 1980's wanted to avoid allocating memory. (Another way of interpreting this is that somebody tried to be a bit too clever.) The temporarily modifies the string you pass as the in its attempt to figure out where the program name ends and the command line arguments begin. Now, it could have made a ...