Showing results for January 2009 - Page 2 of 4 - The Old New Thing

Jan 22, 2009
0
0

Why do I get the error REGDB_E_IIDNOTREG when I call a method that returns an interface?

Raymond Chen
Raymond Chen

This is another manifestation of the missing marshaller problem. IContextMenu *pcm; HRESULT hr = psf->GetUIObjectOf(hwnd, 1, &pidl, IID_IContextMenu, NULL, &pcm); // fails with REGDB_E_IIDNOTREG The IContextMenu interface does not have a proxy/stub factory (as of this writing). Recall that shell objects, as a rule, a...

Code
Jan 20, 2009
0
0

If you didn’t like the answer, asking the same question again is unlikely to help

Raymond Chen
Raymond Chen

I find it surprising how often this happens. A customer liaison will send a question to a mailing list like this: From: X To: Gizmo Discussion Hi, everybody. My customer is using the Gizmo Toolkit and wants to frob a gizmo without first registering as a frobber. They created the gizmo with , passing all the default flags, and then they call ...

Otheremail
Jan 19, 2009
0
0

May the Horse Be With You: Stories from the racetrack

Raymond Chen
Raymond Chen

Only a Game interviews Harvey Pack [real], author of May the Horse Be With You, a collection of stories about horse racing. I don't really care much about horse racing, but I do love a good story, and Harvey Pack has a bazillion good stories.

Non-Computer
Jan 19, 2009
0
0

Why isn’t the screen resolution a per-user setting?

Raymond Chen
Raymond Chen

Via the suggestion box, Dominic Self asks why screen resolution is a global setting rather than a per-user setting. Well, first of all, it's not even a global setting. It's a session setting. That it's not a global setting is not readily apparent most of the time since only Windows Terminal Server is set up to support multiple simultaneous inter...

Other
Jan 16, 2009
0
0

You cannot pre-emptively reserve a file extension

Raymond Chen
Raymond Chen

The following question came in from a customer: If our program isn't installed and users double-click our document, they get sent to a Web site that presents a list of programs, but we want to send the user directly to our download site. How do we claim a file extension for our application? Um, you don't. You cannot pre-emptively reserve a ...

Other
Jan 15, 2009
0
0

If you’re at a Thai restaurant with a Thai person who’s ordering food in Thai, and she asks you if you like your food spicy, think twice before answering

Raymond Chen
Raymond Chen

I think you see where this is going. I'm at a Thai restaurant with my sister-in-law, who is Thai. She's talking with the waitress in Thai, and she discovers that the restaurant's cook is someone she knows. And since she's from Thailand, she assumes the task of ordering the food, since she knows what's good and what isn't. During their convers...

Non-Computer
Jan 15, 2009
0
0

What is this magic setting that synthesizes Unicode from non-Unicode?

Raymond Chen
Raymond Chen

Commenter dan g. wonders how Windows can treat non-Unicode applications as Unicode via the Regional and Language Options control panel, specifically the part that lets you choose the Language for non-Unicode programs. "Having always believed that the only way to display, say, Chinese characters correctly was to compile with _UNICODE, this facility...

Other
Jan 14, 2009
0
0

The day shell.windows.com went down

Raymond Chen
Raymond Chen

When the file association Web service was first being developed, the programmer responsible for implementing the feature just scrounged around and found an old unused computer and set it up as a simple Web server under his desk, so there would be something to test the code against. That server happily churned away serving out file extension inform...

History
Jan 13, 2009
0
0

Excessive speed appeared to be a factor in the crash

Raymond Chen
Raymond Chen

In February 2007, a serious automobile accident took place in southwest Washington. A twelve-year-old boy was at the wheel of an SUV when he lost control and struck another vehicle. According to the sheriff's office, "Excessive speed appeared to be a factor in the crash." I dunno, I think a major factor is that a twelve-year-old was behind the whe...

Non-Computer