The Old New Thing

What is the strange garbage-looking string in the "command" value of a static verb?

A customer from a major software vendor asked, "What is the significance of the command value that can be found under HKCR\⟨progid⟩\shell\open\command. It appears to be a copy of the default value, but with the program name replaced with apparent garbage. We've seen this both with Microsoft products as well as products by other ...
Comments are closed.0 0
Code

If you want to be notified when your app is uninstalled, you can do that from your uninstaller

A customer had a rather strange request. "Is there a way to be notified when the user uninstalls any program from Programs and Features (formerly known as Add and Remove Programs)?" They didn't explain what they wanted to do this for, and we immediately got suspicious. It sounds like the customer is trying to do something user-hostile, like ...
Comments are closed.0 0
Code

Did the Windows 95 interface have a code name?

Commenter kinokijuf wonders whether the Windows 95 interface had a code name. Nope. We called it "the new shell" while it was under preliminary development, and when it got enabled in the builds, we just called it "the shell." (Explorer originally was named Cabinet, unrelated to the container file format of the same name. This original ...

Finding the shortest path to the ground while avoiding obstacles

Today's Little Program solves the following problem: Consider a two-dimensional board, tall and narrow. Into the board are nailed a number of horizontal obstacles. Place a water faucet at the top of the board and turn it on. The water will dribble down, and when it hits an obstacle, some of the water will go left and some will go right. The...
Comments are closed.0 0
Code

How do I obtain the computer manufacturer's name from C++?

Some time ago, I gave a scripting solution to the problem of obtaining the computer manufacturer and model. But what if you want to do this from C++? I could translate the script into C++, or I could just point you to Creating a WMI Application Using C++ in MSDN. In particular, one of the WMI C++ Sample Applications does exactly what you ...
Comments are closed.0 0
Code

When I send a WM_GETFONT message to a window, why don't I get a font?

A customer reported that the WM_GET­FONT message was not working. Specifically, they sent the message to a window, and they can plainly see that the window is rendering with a particular font, yet the WM_GET­FONT message returns 0. Why isn't the window returning the correct font handle? The WM_SET­FONT and WM_GET­FONT messages...
Comments are closed.0 0
Code

Microspeak: Tell Mode / Ask Mode

As a product nears release, the rate of change slows down, and along the way, the ship room goes through stages known as Tell Mode and Ask Mode. In Tell Mode, any changes to the product do not require prior approval, but you are required to present your changes to the next ship room meeting and be prepared to explain and defend them. The ...

The alternate story of the time one of my colleagues debugged a line-of-business application for a package delivery service

Some people objected to the length, the structure, the metaphors, the speculation, and fabrication. So let's say they were my editors. Here's what the article might have looked like, had I taken their recommendations. (Some recommendations were to text that was also recommended cut. I applied the recommendations before cutting; the cuts are...

How can I get the URL to the Web page the clipboard was copied from?

When you copy content from a Web page to the clipboard and then paste it into OneNote, OneNote pastes the content but also annotates it "Pasted from ...". How does OneNote know where the content was copied from? As noted in the documentation for the HTML clipboard format, Web browsers can provide an optional Source­URL property to ...
Comments are closed.0 0
Code