Showing results for May 2008 - Page 4 of 4 - The Old New Thing

May 7, 2008
Post comments count0
Post likes count0

Apparently I've been promoted by mistake all these years

Raymond Chen
Raymond Chen

A few years ago, this posting on the secret to getting promoted caught my eye. After several years at Microsoft, I had an epiphany today. I came to the realization that the best way, rather the only way -- to get promoted is to demonstrate the ability to hire and retain top talent. Other factors do go a long way but without the ability to hire, y...

Other
May 6, 2008
Post comments count0
Post likes count0

Psychic debugging: Why does ExitProcess(1) produce an exit code of zero?

Raymond Chen
Raymond Chen

Here's a question that came from a customer. By now, you should already have the necessary psychic powers to answer it. Our program calls to indicate that it exited unsuccessfully. The process that launched our program waits for the program to exit and then calls to retrieve the exit code. The function succeeds, but the exit code is zero! How c...

Code
May 5, 2008
Post comments count0
Post likes count0

News flash: It's dangerous to drive a car if you are blind

Raymond Chen
Raymond Chen

The BBC reminds us that if you have no eyes, it's dangerous for you to drive a car. Follow-up: The man was given a suspended jail sentence and—I am not making this up—has been banned from driving for three years. Three years?

Non-ComputerNews flash
May 5, 2008
Post comments count0
Post likes count0

If you pass invalid parameters, then all bets are off

Raymond Chen
Raymond Chen

Alun Williams pointed out that if you pass invalid parameters to , it does not destroy the . Well, yeah, because if you pass invalid parameters, then all bets are off. Different functions perform different degrees of parameter validation; the degree to which this is done is typically guided by security concerns. Information that crosses securi...

Code
May 2, 2008
Post comments count0
Post likes count0

Canoeing around the Washington Park Arboretum

Raymond Chen
Raymond Chen

This weekend is Opening Day of the Seattle boating season. Even if you don't own a boat, you can enjoy the warmer weather and rent a canoe and paddle around the Arboretum. (Don't do it on Opening Day, though.) Here's a nice map courtesy of the Northwest Outdoor Center. Pay heed to avoid the green section marked Caution. I made a wrong turn an...

Non-Computer
May 2, 2008
Post comments count0
Post likes count0

You didn't know you could add properties by atom, and it's a good thing you didn't know

Raymond Chen
Raymond Chen

As I noted a few days ago, there is weirdness associated with properties added by atom. This weirdness stems from the fact that adding properties by atom is really a hole in the original implementation rather than something designed on purpose. The original 16-bit code for adding and removing properties went roughly like this: First, let's l...

History
May 1, 2008
Post comments count0
Post likes count0

Strange uses for window class atoms

Raymond Chen
Raymond Chen

When you register a window class (with the or function), you get an back. What use is this atom? Not much. You can use this atom in many places where a window class name can be used; just convert it to a string with the macro. Let's change our scratch program to illustrate: We save the atom returned by the function and use it (in the...

Code