Showing results for February 2014 - Page 2 of 3 - The Old New Thing

Feb 17, 2014
0
0

The Grand Duke's monocle is an affectation

Raymond Chen
Raymond Chen

In the Disney adaptation of Cinderella, the Grand Duke wears a monocle. The monocle moves from eye to eye during the course of the story. The Grand Duke's monocle is an affectation. Either that, or he needs a full pair of glasses, but is very frugal.

Non-Computer
Feb 17, 2014
0
0

Writing automation to wait for a window to be created (and dismiss it)

Raymond Chen
Raymond Chen

Today's Little Program uses UI Automation to cancel the Run dialog whenever it appears. Why? Well, it's not really useful in and of itself, but it at least provides an example of using UI Automation to wait for an event to occur and then respond to it. Okay, let's see what's going on here. The program registers a delegate with UI automation w...

Code
Feb 14, 2014
0
0

When someone proposes marriage, bear in mind that there is a question that needs to be answered

Raymond Chen
Raymond Chen

A colleague of mine was at a restaurant, and he spotted a young couple at the next table. The woman fawned over a classic diamond engagement ring, and when she put it on her finger, he decided that it was safe to ask them about it. They had gotten engaged earlier that day, and the man told the story of the proposal, up to the point where he asked ...

Non-Computer
Feb 14, 2014
0
0

Debugging: Diagnosing why malloc is failing

Raymond Chen
Raymond Chen

A customer had some code which was experiencing memory allocation failures when calling (which maps to ). The function returns , and reports . However, there was still plenty of memory free: The customer was continuing their investigation but was looking for some pointers since the bug took a day to emerge. Could it be heap fragmentation? (The...

Code
Feb 12, 2014
0
0

The heavy metal umlaut encroaches into Seattle real estate

Raymond Chen
Raymond Chen

The heavy metal umlaut is creeping into Seattle real estate. I submit for your consideration the condominium known as Bleü. I can't even tell what language they are trying to pretend to be. There are other properties in Seattle with dots, but at least the dots aren't gratuitous. Hotel Ändra in Belltown takes its name from the Swedish ...

Non-Computer
Feb 12, 2014
0
0

What is this extra thread in my process?

Raymond Chen
Raymond Chen

A customer liaison asked: After applying Service Pack 2 to Windows Server 2003, my customer found that a simple MFC application (just using the template, no customization) has two threads when it is supposed to have only one. After five minutes, one of the threads exits. This doesn't happen on Windows Server 2003 RTM or Windows Server 2003...

Code
Feb 10, 2014
0
0

Excuses I learned from babies

Raymond Chen
Raymond Chen

I was visiting a friend of mine, and his young daughter was being unusually cranky. He explained, "Oh, she's teething." I filed that away as an excuse I could use the next time I felt cranky. "Sorry about that. I'm teething." Here's another excuse you might want to use: "No, I'm not drunk. I simply lost interest in remaining upright."

Non-Computer
Feb 10, 2014
0
0

Execute a file as if it were a program, even though its extension is not EXE

Raymond Chen
Raymond Chen

Today's Little Program executes a file as if it were a program, even though its extension is not EXE. The idea here is to prevent somebody from running your program by accident, so you give it an extension like . This is great for preventing somebody from running the program by mistake, but how do you do it on purpose? We're merely using the ...

Code