The Old New Thing

People just like you, for certain values of you

I received a brochure in the mail for a local church which says that it's "full of people just like you." Everybody in the brochure is white. "You'll fit right in!" it concludes. Bonus chatter: My friends guessed that perhaps the church members are all computer programmers who work at Microsoft and speak Swedish badly...

It's fine to rename a function in your DEF file, but when you do, you have to link to that function by its new name

Jeffrey Riaboy asks why, if he renames a function in his DEF file, attempts to link to the function by its old name fail. Well, um, yeah, because you renamed it. Let's take the situation apart a bit; maybe it'll make more sense. I'm going to ignore a lot of details (dllimport/dllexport, calling conventions) since they are not relevant ...
Comments are closed.0 0
Code

How you might be loading a DLL during DLL_PROCESS_DETACH without even realizing it

As you are I'm sure aware, you shouldn't be doing much of anything in your DllMain function, but you have to watch out for cases where you end up doing them accidentally. Some time ago, I was investigating a failure which was traced back to loading a DLL inside DLL_PROCESS_DETACH. Wait, what kind of insane person loads a DLL as part of ...
Comments are closed.0 0
Code

I could just use a picture of a regular-sized shopping cart from farther away

Internet retailer woot! went to CES 2010 and covered it on their blog. (CES category.) But they don't cover what the media elite cover, the big announcements, the hot products. Nope, they cover the weird stuff. They have uncrating photos of CES itself, they infiltrate the The Consumer Breakfast Buffet Show, and they take super ...

It rather involved being on the other side of this airtight hatchway: If they can inject code, then they can run code

One category of the dubious security vulnerability is designing an insecure system, putting together an exploit, and then blaming one of the components of the exploit rather than the insecure system in the first place. I have found a critical security vulnerability in the XYZ scripting object which permits modifying files on the Web server ...

News flash: Wearing clothing keeps you warm

Every so often, I'll run across a statement of the obvious disguised as news and post it to the News flash tag, but the ones I've found have nothing on this collection of the 11 Most Painfully Obvious Newspaper Articles Ever. Just click through and slap your forehead. Bonus News Flash: Mark McGwire used steroids. I can't wait to see what ...

Why does GetCommandLine give me a corrupted command line?

A customer had the following problem: We're calling GetCommandLine to retrieve the command line, and the documentation says that it returns a single null-terminated string. However, when we call it in our application, we find that it is actually a double-null-terminated string. The buffer returned consists of a series of null-terminated ...
Comments are closed.0 0
Code

But that's not all: The story of that cheesy Steve Ballmer Windows video

While it's true that the cheesy Steve Ballmer Windows video had bad music, bad hair, and bad acting, it's also true that all that cheese was intentional. That video was produced for and shown at the Company Meeting, back when a mainstay of the Company Meeting was spoofs of popular television advertisements—what today would be called "...

Weight Gain 4000, the competition

Some years ago, one of my colleagues mentioned at the lunch table, "I went hiking this weekend, and man, my backpack was so heavy. I weighed it, and it was like 35 pounds. And then I realized, wait a second, I'm overweight by 35 pounds. I'm carrying this heavy backpack all the time!" Thus began a collective weight loss competition we called ...

Pros and cons of using a four-year-old as your language instructor

I have a niece who is a native speaker of Chinese. Playing with her is a free language lesson, and there are advantages and disadvantages. One advantage is that you will learn all the basic words, and you won't run the risk that your instructor will accidentally use some advanced vocabulary that will throw you off. (You also learn some words ...

Feedback usabilla icon