The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Disabling the PrtSc key by blocking input
A customer asked how to disable the PrtSc key in the On-Screen Keyboard. There is no way to disable the PrtSc key in the On-Screen Keyboard. The On-Screen Keyboard shows a keyboard, and you can click any virtual key you like. There is no policy to remove specific keys from the On-Screen Keyboard. But this was a case of a customer breaking down a problem and asking a question about a specific part of the problem instead of presenting the entire problem so that a solution to the overall problem could be developed. The customer's real goal was to disable the PrtSc key in general. They had figured out how to d...
Turning off the disco lights on the Start screen
Blinky blinky.
How do you intercept taskbar notification balloons?
A customer wanted to know how they could monitor and intercept taskbar notification balloons. In particular, they wanted to intercept the clicks on a particular balloon and take alternative action. There is no supported mechanism for intercepting taskbar notification balloons or redirecting clicks on them. Imagine if that were possible: Fabrikam would intercept notification balloons for Contoso. If they had access to the balloon text itself, they might change the message from "Contoso products are back in stock. Click here to place your order." to "Special offer for Contoso customers: Take 10% off your first or...
Some vice presidents forget that not everybody attends the same meetings that they do
There are some vice presidents who forget that not everybody attends the same meetings that they do. When they send email to the entire division, they use buzzwords and acronyms that are not widely-understood. For example, they may mention the great progress that the Nosebleed team is making with DOXLA,¹ but that doesn't mean much to people who aren't on the Nosebleed team. Meanwhile, the people on the Nosebleed team probably don't know what the vice president is talking about when they compliment the Bunion team's recent breakthough in MT1 alignment.¹ When that happens, I like to send email back to t...
Mysterious email, possible social engineering, whatever it was, it didn't work
A colleague of mine got a strange piece of email. It went something like this, although I've substituted a fictitious nation and fictitious company name to protect the guilty(?). Subject: St. George's Island Embassy Trade Mission: Meeting request on behalf of Contoso Corporation Dear 〈name〉, I am contacting you following the advice of 〈senior executive〉, CTO of Microsoft Pangaea. The St. George's Island Embassy Trade Mission is currently assisting a local company, Contoso. Contoso would like to present 〈technology〉 to Microsoft. Details are in the attached document. Would...
This was only a test; if this had been an actual concert…
I dreamed that there was a fire in Benaroya Hall during a concert. The flames swirled overhead up by the ceiling. The exit doors had been blocked by security, so people flowed from door to door looking for a way out. Ha-ha, it was just a drill, and the flames were pyrotechnics. This dream brought to you by Great Ideas in Public Safety.
Destroying all child processes (and grandchildren) when the parent exits
Today's Little Program launches a child process and then just hangs around. If you terminate the parent process, then all the children (and grandchildren and great-grandchildren, you get the idea) are also terminated. The tool for this is the Job Object. Specifically, we mark the job as "kill on job close" which causes all processes in the job to be terminated when the last handle to the job is closed. We must therefore be careful not to allow this handle to be inherited, because that would create another handle that needs to be closed before the job is terminated. And of course we need to be careful not to...
Is it wrong to call SHFileOperation from a service?
A customer had a simple question: "Is it wrong to call from a service?" I don't know if I'd call it wrong, but I'd call it highly inadvisable. Update: See Is it wrong to call SHFileOperation from a service? Revised.
What’s up with the registry key HKEY_CLASSES_ROOT\CLSID\CLSID?
It's the class moniker.