The Old New Thing

2012 Q3 link clearance: Microsoft research edition

My Q1 and Q3 link clearances are traditionally for links to other Microsoft bloggers, but this time I'm going to link to a few Microsoft research papers I found interesting. Why do Nigerian scammers say they're from Nigeria? Short answer: Because it ensures that the replies come only from the most gullible people on earth. Bonus ...

Data in crash dumps are not a matter of opinion

A customer reported a problem with the System­Time­To­Tz­Specific­Local­Time function. (Gosh, why couldn't they have reported a problem with a function with a shorter name! Now I have to type that thing over and over again.) We're having a problem with the System­Time­To­Tz­Specific­Local­...

The Ride to Rio: Bicycling from Los Angeles to Rio de Janeiro

An acquaintance of mine remarked that he sold his bicycle in Seattle a few months ago to some guy who explained, "I'm going to ride it to South America." "Okay," my acquaintance said, probably with some degree of skepticism. But it's a real project, and they head out soon! Ride to Rio: Four riders who "share a thirst for being stupid and ...

Why aren't environment variables being expanded in my RGS file?

A customer was having trouble with their RGS file. I want to include the below line in a .rgs file: When I do this, registering of the dll fails with 80002009. Any help? If I change it to then the registration succeeds (but of course now contains a hard-coded path). A common problem people have when asking a question is assuming ...
Comments are closed.0 0
Code

Sabotaging yourself: Closing a handle and then using it

A customer reported a problem with the WaitForSingleObject function: I have a DLL with an Initialize() function and an Uninitialize() function. The code goes like this: Under certain conditions, the Initialize() function is called twice, and the Uninitialize() function is correspondingly called twice. Under these conditions, if I run ...
Comments are closed.0 0
Code

Why can't I set "Size all columns to fit" as the default?

A customer wanted to know how to set Size all columns to fit as the default for all Explorer windows. (I found an MSDN forum thread on the same subject, and apparently, the inability to set Size all columns to fit as the default is "an enormous oversight and usability problem.") The confusion stems from the phrasing of the option; it's not ...

I brought this process into the world, and I can take it out!

Clipboard Gadget wants to know why normal processes can kill elevated processes via TerminateProcess, yet they cannot do a trivial Show­Window(hwnd, SW_MINIMIZE). "Only explorer seems to be able to do so somehow." There are several questions packed into this "suggestion." (As it happens, most of the suggestions are really questions; the ...

In vollen Zügen genießen

One of my friends bought me a souvenir one one of his trips to Germany. It is a beer mug from Bayerischer Bahnhof, a restaurant and brewery at the Leipzig Bayerischer Bahnhof. The mug carries the brewery's slogan In vollen Zügen genießen, which is a German idiom meaning "to enjoy to the fullest." Literally, "Das Leben in vollen Z&...

How can I implement SAFEARRAY.ToString() without going insane?

A colleague needed some help with manipulating SAFEARRAYs. I have some generic code to execute WMI queries and store the result as strings. Normally, Variant­Change­Type(VT_BSTR) does the work, but Variant­Change­Type doesn't know how to convert arrays (e.g. VT_ARRAY | VT_INT). And there doesn't seem to be an easy way ...
Comments are closed.0 0
Code

Feedback usabilla icon