The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
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.
What's the difference between the wParam of the WM_NOTIFY message and the idFrom in the NMHDR structure?
The message takes the following parameters: Notice that the identifier of the control sending the message appears in two places, once in the and again in the . What's the difference? There is no difference. It's just a convenience. The same value is passed in both places, and you can check whichever one is easier for you. You might use the because it avoids having to dereference a pointer. You might use the because that way you have only one thing to pass to your helper function. Whatever floats your boat. Passing the same information multiple ways is hardly new. The message also passes redundant inf...
Sir, is this your high-speed ferry?
The Victoria Clipper is a high-speed ferry that runs primarily between Seattle and Vancouver Victoria, BC. Early Sunday morning, a man scaled a fence and drove off with one of the boats. The issue was resolved without major incident and only minimal damage, which means that it is now open season on jokes! "Why yes, officer, this is my ferry. I must have left the registration in my other pants." According to the vessel superindendent, "There is a joystick and he thought it was like an Xbox," ending up driving the boat in circles. You can see the GPS track here (photo 19). Of course, if the thief had had a K...
How do I configure the timeout used by UI0Detect (Interactive Services Detection service)?
Windows Vista introduced Session 0 Isolation which enforces the rule that services should not display UI. If a service tries to display UI, another service known as the Interactive Services Detection service detects this situation and signals the user that a service wants to display UI and gives the user an opportunity to switch to the service desktop, respond to the UI, and then switch back. If the user ignores the service for about one minute, it switches back automatically, on the assumption that something went bad with the detection and the service is actually finished with its UI. (That way, the user ...