Showing archive results for 2008

May 28, 2008
Post comments count0
Post likes count1

Reading a contract from the other side: SHSetInstanceExplorer and SHGetInstanceExplorer

Raymond Chen

Shell extensions that create worker threads need to call the function so that Explorer will not exit while the worker thread is still running. When your worker thread finishes, you release the that you obtained to tell the host program, "Okay, I'm done now, thanks for waiting." You can read this contract from the other side. Instead of thinkin...

Code
May 27, 2008
Post comments count0
Post likes count0

The cultural axes of punctuality and waiting in line

Raymond Chen

Even ten minutes after my conference talk was scheduled to begin, people were still wandering into the hall. My host explained that in Portugal, nothing starts on time. (This Web site goes so far as to say that arriving a half hour to 45 minutes late is customary.) I asked whether the Portuguese form orderly lines when waiting for things. The ans...

Non-Computer
May 27, 2008
Post comments count0
Post likes count1

You can't give away something that isn't yours

Raymond Chen

This rule of real life applies to code as well. If something doesn't belong to you, then you can't give it away. For example, functions like and take ownership of the item that you pass it. In SetClipboardData's case, the memory block you pass as the parameter becomes the property of the clipboard. For it's the that becomes the property of ...

Code
May 26, 2008
Post comments count0
Post likes count0

Welcome to the International Bank of Raymond

Raymond Chen

Over a decade ago, one of my colleagues (whom I'll call "Ralph" for the purpose of this discussion) told me that he briefly ran an international bank. Well, not really. Ralph's first roommate was another Microsoft employee, somewhat of the stereotypical computer nerd in the sense that he could write code like a maniac but didn't have a good grasp...

Non-Computer
May 23, 2008
Post comments count0
Post likes count1

What does TranslateAccelerator do?

Raymond Chen

For some reason, there appears to be some confusion over what does. It's very simple, and it's all spelled out in the documentation. You give it a message, and if the message is a keypress that matches an entry in the accelerator table, the corresponding or message is sent to the window you said you are translating messages for. One point of...

Code
May 22, 2008
Post comments count0
Post likes count1

Microspeak: On-board (verb)

Raymond Chen

Here are a few citations. On a list of activities: Presumably they mean bring on board. What makes this particularly interesting is that they didn't convert a noun to a verb; they converted a prepositional phrase to a verb, demonstrating once again the malleability of the English language. Here's a snippet from a blog post which seems to use...

Non-ComputerMicrospeak
May 21, 2008
Post comments count0
Post likes count0

Food discovery: Vietnamese sandwiches, aka bánh mì

Raymond Chen

Some friends came down to visit from Vancouver to take advantage of the favorable exchange rate, and when the topic of lunch arose, one of them suggested Vietnamese sandwiches. "What are Vietnamese sandwiches?" I asked. "Okay, that settles it. We're having Vietnamese sandwiches for lunch," was the response. We went to the generically-named Sea...

Non-Computer
May 21, 2008
Post comments count0
Post likes count1

Another interesting detail from the analysis of Windows Error Reporting data for Explorer

Raymond Chen

I was in a meeting last year where I learned an interesting tidbit of information. One of the people at the meeting was looking at the error reports submitted against Explorer, and the breakdown went something like this. For the purpose of discussion, the number of reports have been normalized into "units", the precise meaning of which is left unsp...

Other
May 20, 2008
Post comments count0
Post likes count0

König Drosselbart: Performed in clay, feathers, and other strange materials

Raymond Chen

This past weekend I went to the Seattle International Children's Festival to attended a performance of König Drosselbart in German. I was not familiar with the story beforehand, but that's okay. It just makes for a better surprise. The interpretation was very creative. The narrators embodied the characters in the story at times; other time...

Non-Computer