A customer wanted to know how to get the location of the taskbar on secondary monitors. "I know that SHAppBarMessage will tell me the location of the taskbar on the primary monitor, but how do I get its location on secondary monitors?" We asked the customer what their actual problem is, where they think that determining the taskbar
A LEGO set to measure Planck's constant.
A security vulnerability report came in that went something like this: Disclosure of arbitrary data from any user An attacker can obtain arbitrary data from any user by means of the following steps: There's no point continuing, because the first step assumes that you are on the other side of the airtight hatchway. If you have compromi
A customer discovered the following behavior when they set up roaming user profiles on their domain. Consider two machines, 1 and 2. An application A is installed on machine 1, but not machine 2. A user with a roaming profile logs onto machine 1 and pins application A to the taskbar. That user then logs off o
One of my colleagues used to work as an IT consultant, and one of his clients was a tobacco company. Since they were a tobacco company, the company policy on smoking was "You can smoke anywhere, any time." "Anywhere" includes the labs. The labs with very expensive precision scientific equipment. My colleague told me that this policy meant th
There are a few ways to load constants into SSE registers. Load them from memory. Load them from general purpose registers via movd. Insert selected bits from general purpose registers via pinsr[b|w|d|q]. Try to calculate them in clever ways. Loading constants from memory incurs memory access penalties. Loading or inserting them f
You might think that the IsWellKnownSid function would tell you whether a SID is well-known, but it doesn't. Rather, it tells you whether a SID exactly matches the well-known SID you specified. For example, you can ask, "Is this the Authenticated Users SID?" or "Is this the Everyone SID?" But you can't ask, "Is this any type of
The DRAWITEMSTRUCT structure has an itemState member which contains a number of bits describing the state of the item being drawn. How do those states map to the underlying control? Most of the states are rather obvious. For a list box item to be selected, it means that the item is part of the selection. But what does selected
A customer reported that the GetProcAddress function was behaving strangely. We have this code in one of our tests: Recently, this test started failing in bizarre ways. When we stepped through the code, we discovered that pfnFoo ends up calling Bar instead of Foo. The first time we try to test pfnFoo, we get stack corruption b
There is probably a name for this phenomenon. I will illustrate it below. "Is there a way to configure the system to do X?" — Go to the Y dialog and select Z. "It doesn't work." — I just tried it. It works for me. I'm using 〈configuration details〉. "Thanks. It's working."