Showing results for August 2014 - The Old New Thing

Aug 29, 2014
0
1

How can I detect that a user's SID has changed and recover their old data?

Raymond Chen
Raymond Chen

A customer maintained a database which recorded information per user. The information in the database is keyed by the user's SID. This works out great most of the time, but there are cases in which a user's SID can change. "Wait, I thought SIDs don't change." While it's true that SIDs don't change, it is also true that the SID associated with a u...

Code
Aug 28, 2014
0
1

Taking advantage of the fact that the handle returned when you create a kernel synchronization object has full access regardless of the actual ACL

Raymond Chen
Raymond Chen

A customer wanted some help deciding what security attributes to place on an event object intended to be used by multiple security contexts. We have two processes, call them A and B, running in different security contexts. I have an event that process A creates and shares with process B. The only thing process A does with the event is signal it,...

Code
Aug 27, 2014
0
0

Where does the Installed Updates control panel get the install date from?

Raymond Chen
Raymond Chen

A corporate customer wanted to know where the Installed Updates control panel gets the Installed On information from, because they found that the values were always set to the current date regardless of when the update was actually installed. The algorithm goes roughly like this: First, ask MSI what date the update was installed by calling and a...

Tips/Support
Aug 26, 2014
0
0

It's time we face reality, my friends: We're not rocket scientists

Raymond Chen
Raymond Chen

During the development of Windows 95, it was common for team members to pay visits to other teams to touch base and let them know what's been happening on the Windows 95 side of the project. It was during one of these informal visits that the one of my colleagues reported that he saw that one of the members of the partner team had a Ga...

History
Aug 22, 2014
0
0

Dispelling the myths, rumors, and innuendo surrounding the QueryPerformanceCounter function

Raymond Chen
Raymond Chen

The function has been the subject of much rumor and innuendo. In response to all the confusion, the kernel folks put together a page which tries to settle the controversy once and for all. It discusses the history of QPC over the ages, the problems it had on earlier versions of Windows or older firmware (which is probably where a lot of the myth...

Code
Aug 21, 2014
0
0

Some reasons not to do anything scary in your DllMain, part 3

Raymond Chen
Raymond Chen

In the same week, the shell team was asked to investigate two failures. The first one was a deadlock in Explorer. The participating threads look like this: The shell extension caused this problem because it ignored the rule against calling shell and COM functions from the entry point, as specifically called out in the documentation as example...

Code
Aug 20, 2014
0
0

If you're looking for the code that displays a particular dialog box, the most directly way to find it is to look for the dialog box

Raymond Chen
Raymond Chen

Suppose you are working in a large or unfamiliar code base and you want to know where the code is that displays a particular dialog box or message box or something. Probably the most direct way of figuring this out is to look for the strings. Say there is a message box that asks for user confirmation. "Are you sure you want to frobulate the flux c...

Other
Aug 19, 2014
0
0

My friend and his buddy invented the online shopping cart back in 1994

Raymond Chen
Raymond Chen

Back in 1994 or so, my friend helped out his buddy who worked as the IT department for a local Seattle company known as Sub Pop Records. Here's what their Web site looked like back then. Oh, and in case you were wondering, when I said that his buddy worked as the IT department, I mean that the IT department consisted of one guy, namely him. And t...

History