Raymond’s complete guide to HSTRING semantics
The title of today's article is a blatant ripoff of Eric Lippert's complete guide to BSTR semantics. I'm going to start with a lie: An HSTRING is a reference-counted Unicode string. Work with me here....
View ArticleWhy do I get a spurious WM_MOUSEMOVE message whenever Resource Manager is...
We saw some time ago that the operating system generates spurious WM_MOUSEMOVE messages as a side effect of mouse cursor recalculations. In a sense, the way to kick-start a mouse cursor recalculation...
View ArticleHow can I update my WinForms app to behave better at high DPI, or at normal...
A customer had a WinForms app that was showing its age. It didn't scale itself properly on high-DPI screens, which means that if you ran it on a Surface Pro 4, you got a teeny-tiny window and then you...
View ArticlePeeking inside an IShellItem to see what it’s made of
Windows XP introduced the IShellItem interface which represents an item in the shell namespace. This encapsulates what traditionally is represented by a pair of things, the the IShellFolder...
View ArticleHow to recognize DNS zone scavenging availability timestamps from quite a...
A customer couldn't figure out how to decipher the scavenge available value that is produced by the dnscmd /zoneinfo command: C:\> dnscmd /zoneinfo contoso.com Zone query result: Zone info: ptr =...
View ArticleObserving the bizarre rumor mill from the other side
I remember being nonplussed upon reading news reports that some Windows feature or other was a sure thing, despite a lack of actual, y'know, official confirmation. The one that sticks with me is the...
View ArticleHow can I detect whether my PC is in tablet mode?
Tablet Mode, introduced in Windows 10, is a blah blah blah blah. Okay, enough with the introduction. From a Store app, you detect whether you are in tablet mode by inspecting the UserInteractionMode...
View ArticleMathematical term or Hollywood movie?
Another little quiz. Mathematical term Hollywood movie The Killing Fields ● Killing Field ● The Levi-Civita Connection ● The Bourne Identity ● The Fredholm Alternative ● The Matrix ● ● Today is the...
View ArticleEven if you modify a high contrast theme so it isn’t quite so high-contrast,...
A customer liaison sent a question to the shell team. Subject: Assistance [REG:628318530717959] Our customer has created a custom theme by editing one of the standard High Contrast themes, but it...
View ArticleIt rather involved being on the other side of this airtight hatchway:...
The EPAL tool is used on Windows 2000 systems as an application compatibility workaround: If there is some program that requires elevation, but you don't want to give your users administrator...
View ArticleWhere can I get the glossary of Microsoft’s standard translations for...
A customer wanted to know where to get a glossary of Microsoft's standard translations of computer terms. The Microsoft Language Portal has a bunch of localization resources, including Interactive...
View ArticleWhy does the Windows 8 sign-in animation slide upward?
The early design for the animation that occurs when you sign in was to take your logon wallpaper and open it up like a curtain. This worked well for nature photos. However, it is very common for...
View ArticleWhat happens if I have multiple asynchronous ReadDirectoryChangesW calls...
A customer ran into an issue with the ReadDirectoryChangesW function. It was rather complicated, but one corner of the issue boiled down to the following: The customer had multiple asynchronous...
View ArticleHow can I preallocate disk space for a file without it being reported as...
A customer wanted to create a file with the following properties: The file has a known maximum size. (The file is a log file, and when the log file gets full, the program closes the log file and...
View ArticleTrying to recover from enhancement software that generates fake input...
A customer had a program that supported the mouse wheel, and they found that some laptops have trackpad enhancement software which supports a gesture for turning the mouse wheel. When the enhancement...
View ArticleWhen I tell Windows to compress a file, the compression is far worse than I...
A customer noted that when they took a very large (multiple gigabyte) file and went to the file's Properties and set "Compress contents to save disk space", the file shrunk by 25%. And then they...
View ArticleWindows Hello face recognition is vulnerable to the Jedi mind trick
Here's a handy tip if you use Windows Hello face recognition, which is available on the Surface Pro 4, Surface Book and a number of other devices: If the device doesn't recognize you, use the Jedi...
View ArticleMicrospeak: Tick-tock
As you might imagine, there's a lot of stuff that needs to happen on the opening day of //build. For //build 2016, my job was to publish the new samples to the Github repo. And //build 2016 was when I...
View ArticleIf you don’t want the changes to be permanent, the don’t pass the flag that...
A customer wanted to make a change to a system setting. We advised them to use the SystemParametersInfo function, adding The SystemParametersInfo function lets you specify whether you want the...
View ArticleWhat is the significance of changing the registration for CLSIDs to point to...
A customer reported that several of their applications stopped working after they installed a third-party program, let's call it Contoso Deluxe. They found that the Contoso Deluxe program, as part of...
View Article