The Old New Thing

Displaying the dictionary, part 1: Naive version

We return briefly to the ongoing Chinese/English dictionary series and write some code to display all the definitions we had worked so hard to collect. (I figure you're anxious to see something on the screen, so I am going to handle the Traditional Chinese/Simplified Chinese issue later. For now, the "Simplified" column will be blank.) ...
Comments are closed.0 0
Code

Maintaining high standards at the International Frederic Chopin Piano Competition

The quintennial International Frederick Chopin Piano Competition will be held later this year, and I was reminded that the awards for "Best performance of a mazurka" and "Best performance of a concerto" have not been awarded since 1985. Simply put: Nobody since 1985 has been good enough to deserve it. The year 1995 was a particularly bad ...

Why does Explorer eject the CD after you finish burning it?

Partly as a convenience, but partly to work around buggy hardware. The developer responsible for CD burning explained it to me. Most CD drives cache information about the disc in their internal memory to improve performance. However, some drives have a bug where they fail to update the cache after the CD has been written to. As a result, you ...

Why can't the default drag/drop behavior be changed?

A common reaction to my explanation of whether dragging a file will result in a move or copy was that there should be a setting that lets you change the algorithm by which Explorer decides whether you want to move or copy. There are a few reasons why this is a bad idea. First, if there were such a setting, then it removes some of the ...

Can you trust the Man on the Street interview?

Occasionally, in a news story, the reporter will ask for comments or opinion from a passer-by (nicknamed "the man on the street"). Greg Packer has created a second career as that man. In the last 10 years, he's been quoted at least a dozen times by the New York Post. He's been quoted at least 14 times by the Daily News, most recently just ...

Why don't control panel programs and property sheets show up in the taskbar?

Control panel programs and property sheets don't show up in the taskbar. Why not? As I recall, the explanation was that control panel programs and property sheets aren't applications. They are auxiliary helper windows that assist you with a task, but they aren't a program in their own right. Therefore, they don't get a taskbar button. I've ...

Answer to quick puzzle about security and synchronization

As many people quickly figured out, the reason why the the WaitForSingleObject returns immediately is that the call is failing. The reason is that the second process opened the handle with EVENT_MODIFY_STATE access, which grants permission to call the SetEvent function, the ResetEvent function, and the fatally flawed PulseEvent function...
Comments are closed.0 0
Code

A quick puzzle about security and synchronization

This quick puzzle floated past one of our internal discussion groups. In Process B, the OpenEvent succeeds, but the WaitForSingleObject returns immediately instead of waiting. Explain. [Correction: I confused the matter by passing TRUE as the third parameter, thereby creating an event that is initially signalled. Change it to ...
Comments are closed.0 0
Code

Feedback usabilla icon