Showing results for October 2009 - Page 3 of 4 - The Old New Thing

Oct 13, 2009
0
0

You always hurt the things you love

Raymond Chen
Raymond Chen

I've tried all sorts of miniature headphones, and the only ones that I like are the ones that come with my Zune. What makes them special? They fit and don't fall out. I try not to be too demanding. But the other day, I was getting out of my car, and due to a badly-stowed Zune, the headphones dangled out of my pocket and got caught in the door. Be...

Non-Computer
Oct 13, 2009
0
0

Why do we have import libraries anyway?

Raymond Chen
Raymond Chen

Last time we looked at the classical model for linking as groundwork for answering Adam's question why do we need import libraries? Why can't all the type information be encoded in the export table? At the time the model for DLLs was being developed, the classical model still was the primary means by which linking was performed. Men were men and...

Other
Oct 12, 2009
0
0

The classical model for linking

Raymond Chen
Raymond Chen

Commenter Adam wonders why we need import libraries anyway. Why can't all the type information be encoded in the export table? This goes back to the classical model for linking. This model existed for decades before Microsoft was even founded, so at least this time you don't have Bill Gates to kick around. (Though I'm sure you'll find a way any...

Other
Oct 9, 2009
0
0

LoadString can load strings with embedded nulls, but your wrapper function might not

Raymond Chen
Raymond Chen

Whenever somebody reports that the function or the member of the structure is not working, my psychic powers tell me that they failed to manage the double-null-terminated strings. Since string resources take the form of a counted string, they can contain embedded null characters, since the null character is not being used as the string term...

Code
Oct 8, 2009
0
0

In Hawaiʻi, "mahalo" might officially mean "thank you"

Raymond Chen
Raymond Chen

In Hawaiʻi, you see the word Mahalo on signs everywhere. In theory, the word means Thank you, but my friend Joe Beda pointed out that in practice the word has a completely different meaning. Here are some examples: In practice, the word mahalo means You're screwed. Obligatory clarification: This was a joke, an attempt at observational hum...

Non-Computer
Oct 8, 2009
0
0

What is the format of a double-null-terminated string with no strings?

Raymond Chen
Raymond Chen

One of the data formats peculiar to Windows is the double-null-terminated string. If you have a bunch of strings and you want to build one of these elusive double-null-terminated strings out of it, it's no big deal. But what about the edge cases? What if you want to build a double-null-terminated string with no strings? Let's step back and lo...

Code
Oct 7, 2009
0
0

I will be speaking at Reflections|Projections 2009

Raymond Chen
Raymond Chen

The way to get me to show up at your conference is to invite me. The folks who run the Reflections|Projections 2009 conference figured that out. I will be there on Friday the 16th for the job fair in the Siebel Atrium, and my talk How Microsoft is Different from School is scheduled for Saturday morning at 11:15. Attendance is free, but that's no...

Other
Oct 7, 2009
0
0

The ways people mess up IUnknown::QueryInterface, episode 3

Raymond Chen
Raymond Chen

Today we'll combine information you already know, some of which I covered in The ways people mess up IUnknown::QueryInterface with additional clues from The layout of a COM object. There's still not enough information for you to solve the problem entirely on your own, but maybe you can demonstrate your nascent psychic debugging powers and solve ...

Code
Oct 6, 2009
0
0

Proto-Microspeak: Efforting

Raymond Chen
Raymond Chen

I have only two citations, so it may not be proper Microspeak. We're efforting that for you. They're not just trying, they're efforting. Solution efforting seems to fall in a gap between teams so there's no clear owner or resourcing focused on it. Bonus jargon: resourcing. Actually, that one sentence came from a longer document packed with ma...

Non-ComputerMicrospeak
Oct 5, 2009
0
0

Trying to come up with the most annoying meal ever

Raymond Chen
Raymond Chen

The other night, I had a small fish for dinner. The small fish combines two annoying features: (1) Lots of tiny bones, and (2) not a lot of meat. The challenge then occurred to me: Come up with the most annoying meal ever. Specifically, the criterion for most annoying meal would be a meal in which the diner expends the most amount of eff...

Non-Computer