The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Hey there token, long time no see! (Did you do something with your hair?)
Consider a system where you have a lot of secured objects, and suppose further that checking whether a user has access to an object is a slow operation. This is not as rare as you might think: Even though a single access check against a security descriptor with a small number of ACEs might be fast, you can have objects with complicated security descriptors or (more likely) users who belong to hundreds or thousands of security groups. Since checking whether a security descriptor grants access to a token is potentially¹ O(nm) in the number of ACEs in the security descriptor and the number of groups the user be...
Flushing your performance down the drain, that is
Some time ago, Larry Osterman discussed the severe performance consequences of flushing the registry, which is a specific case of the more general performance catch: Flushing anything will cost you dearly. A while back, I discussed the high cost of the "commit" function, and all the flush-type operations turn into a commit at the end of the day. , [see correction below] , , they all wait until the data has been confirmed written to the disk. If you perform one of these explicit flush operations, you aren't letting the disk cache do its job. These types of operations are necessary only if you're trying to main...
The contractually obligatory beeper, and the customers who demand them
One of the fun parts of meeting with other developers, either at conferences or on my self-funded book tour, is exchanging war stories. Here's one of the stories I've collected, from somebody describing a former company. As is customary, I've removed identifying information. One day, the engineering team were instructed that the team was being issued a beeper, and that a member of the engineering team had to be on call at all times. This new requirement was the handiwork of the sales team, who landed a big contract with a customer, but the customer insisted on a support contract which included the ability to t...
How do I customize the order of items in the All Programs section of the Start menu?
The items in the All Programs section of the Start menu are grouped into two sections, although there are no visible divider lines between them. We saw earlier that the Fast Items lost their special status in Windows Vista and are sorted with the regular items. Another change from Windows XP is the order of the remaining two groups: Windows XP put folders above non-folders, because that was the sort order imposed by the method so that folders sorted above files in regular Explorer windows. This deviation from standard sort order starting in Windows Vista was introduced because the guidan...
Was there really an Opera billboard outside Microsoft main campus?
Maybe somebody took a picture.c
What happens to a named object when all handles to it are closed?
A customer had a question about named kernel objects: I understand that handles in a process if leaked will be destroyed by the kernel when the process exits. My question would be around named objects. Would named objects hold their value indefinitely? If I run a small utility app to increment a named counting semaphore, the count of that named semaphore could be lost when that app exits? I would expect it to always hold its current value so that transactions across processes and across time could be held even if no process is holding on to it. When the last handle to a named kernel object (such as a na...
It rather involved being on the other side of this airtight hatchway: If you grant users full control over critical files, then it's not the fault of the system for letting users modify them
Today's dubious security vulnerability is another example of If you reconfigure your computer to be insecure, don't be surprised that there's a security vulnerability. This example comes from by an actual security vulnerability report submitted to Microsoft: I have found a critical security vulnerability that allows arbitrary elevation to administrator from unprivileged accounts. I can just stop there because your brain has already stopped processing input because of all the alarm bells ringing after you read that first step. That first step gives away the farm. If you grant control to the entire content...
Yes, the Windows 7 beta wallpaper was a picture of a betta fish
It wasn't long before people realized that the fish in the default wallpaper for the Windows 7 beta was a betta fish. This was intended to be a cute little pun, though some people took the semiotics to an extreme, Dude, this is Windows, not The Da Vinci Code. It's not like the people who chose the wallpaper are using a backchannel to pass secret messages to you like "I know I'm not supposed to tell you, but here's the Windows product schedule" or "Help, I'm trapped in a wallpaper factory!" They're just having a bit of fun. I have yet to see anybody point out that the fish was blowing seven bubbles. And no...
Shutdown reason codes are reason codes, not error codes or HRESULTs
A customer liaison asked the following question on behalf of his customer: My customer is finding that their Windows Server 2003 system has restarted, and they want to find out why. I've found some event log similar to the ones below, but I don't know what error code is. I've searched the Knowledge Base but couldn't find anything relevant. Please let me know why the system restarted. The value is not an error code. It says right there that it's a reason code: The system shutdown reason codes are documented in MSDN under the devious heading System Shutdown Reason Codes. In this case, the value is a ...