The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

How can I let my child use an app that I bought from the Windows Store?
Dec 24, 2014
Post comments count 0
Post likes count 0

How can I let my child use an app that I bought from the Windows Store?

Raymond Chen
Raymond Chen

If you buy an app from the Windows Store, you can make it available to other users on the same Windows PC. This is useful if you, say, buy an app for your child to use. Here's how you do it. (This is all explained on the Windows Store blog, but I've converted it into a step-by-step and updated it for Windows 8.1.) First, sign on as yourself and install the app under your own account. Next, sign on as the child (or whatever other account you want to share the app with), and launch the Store from that second account. In the Store app, go to the top of the screen and hit Account, then My account. From the My ac...

The Softsel Hot List for the week of December 22, 1986
Dec 23, 2014
Post comments count 0
Post likes count 0

The Softsel Hot List for the week of December 22, 1986

Raymond Chen
Raymond Chen

Look at all that stuff people bought.

Setting, clearing, and testing a single bit in an SSE register
Dec 22, 2014
Post comments count 0
Post likes count 1

Setting, clearing, and testing a single bit in an SSE register

Raymond Chen
Raymond Chen

Today I'm going to set, clear, and test a single bit in an SSE register. Why? On Mondays I don't have to explain why. First, we use the trick from last time that lets us generate constants where all set bits are contiguous, and apply it to the case where we want only one bit. We start by setting all bits in . We then shift both 64-bit lanes right by 63 positions, putting 1 in each lane. If the bit we want is in the upper half, then we shift the entire value left 8 bytes (64 bits). This clears the bottom 64 bits and leaves the upper 64 bits with all bits set. (Similarly, if the bit we want is in the...

How did protected-mode 16-bit Windows fix up jumps to functions that got discarded?
Dec 19, 2014
Post comments count 0
Post likes count 0

How did protected-mode 16-bit Windows fix up jumps to functions that got discarded?

Raymond Chen
Raymond Chen

Commenter Neil presumes that Windows 286 and later simply fixed up the movable entry table with jmp selector:offset instructions once and for all. It could have, but it went one step further. Recall that the point of the movable entry table is to provide a fixed location that always refers to a specific function, no matter where that function happens to be. This was necessary because real mode has no memory manager. But protected mode does have a memory manager. Why not let the memory manager do the work? That is, after all, its job. In protected-mode 16-bit Windows, the movable entry table was ignored....

How can I query the location of the taskbar on secondary monitors?
Dec 18, 2014
Post comments count 0
Post likes count 0

How can I query the location of the taskbar on secondary monitors?

Raymond Chen
Raymond Chen

A customer wanted to know how to get the location of the taskbar on secondary monitors. "I know that 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 location on secondary monitors is the solution. The customer was kind enough to explain. Our application shows a small window, and sometimes users move it behind the taskbar. They then complain that they can't find it, and they have to move their taskbar out of the way in order to find it again. We...

It's not too late (okay maybe it's too late) to get this gift for the physicist who has everything
Dec 17, 2014
Post comments count 0
Post likes count 0

It's not too late (okay maybe it's too late) to get this gift for the physicist who has everything

Raymond Chen
Raymond Chen

A LEGO set to measure Planck's constant.

It rather involved being on the other side of this airtight hatchway: Account vulnerable to Active Directory administrator
Dec 17, 2014
Post comments count 0
Post likes count 1

It rather involved being on the other side of this airtight hatchway: Account vulnerable to Active Directory administrator

Raymond Chen
Raymond Chen

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 compromised the domain controller, then you control the domain. From there, all the remaining steps are just piling on style points and cranking up the degree of difficulty. A much less roundabout attack is as follows: No, wait, I can make it even easier. You are the dom...

If you set up roaming profiles, you are expected to set up each machine identically, for the most part
Dec 16, 2014
Post comments count 0
Post likes count 0

If you set up roaming profiles, you are expected to set up each machine identically, for the most part

Raymond Chen
Raymond Chen

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 of machine 1 and logs onto machine 2. Now things get interesting: The taskbar on machine 2 initially shows a white icon on the taskbar, representing the nonexistent application A. A short time later, that icon vanishes. When the user logs off of machine&n...

When corporate policies meet precision scientific equipment
Dec 15, 2014
Post comments count 0
Post likes count 1

When corporate policies meet precision scientific equipment

Raymond Chen
Raymond Chen

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 that the company regularly replaced $50,000 pieces of equipment after only a few months, thanks to smoke damage. But the company couldn't change their smoking policy. Imagine the public relations disaster if a tobacco company had a no-smoking policy! Starting next year, cigar...