Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

The default error mode (SetErrorMode) is not zero

A customer put the following code at the start of their program: // If this assertion fires, then somebody else changed the error mode // and I just overwrote it with my error mode....

View Article


Image may be NSFW.
Clik here to view.

Once you return from the WM_ENDSESSION message, your process can be...

A customer had a program which performed some final I/O operations as it exited. Various C++ objects deleted files or flushed buffers as part of their destructors. The customer found that if their...

View Article


Image may be NSFW.
Clik here to view.

It's the address space, stupid

Nowadays, computers have so much memory that running out of RAM is rarely the cause for an "out of memory" error. Actually, let's try that again. For over a decade, hard drive have been so large (and...

View Article

Image may be NSFW.
Clik here to view.

2013 mid-year link clearance

Another round of the semi-annual link clearance. Why organized shoplifters love Tide liquid detergent: High value-to-volume, low risk, easy to fence due to supply chain issues. How to tell if a "shark...

View Article

Image may be NSFW.
Clik here to view.

Building on our program that draws content at a fixed screen position...

Today's Little Program uses the technique we saw last week of drawing content at a fixed screen position, regardless of window position, but adds a little physics to it. Start with our scratch program...

View Article


Image may be NSFW.
Clik here to view.

I wonder what sort of efficiency that house gets on the Autobahn

I dreamed that I discovered a path behind my house that led to a playground. It also led to the house of one of my friends. To access to the path from her house, you had to swing the stove away from...

View Article

Image may be NSFW.
Clik here to view.

You can read as well as I can, or maybe not

Occasionally, somebody will ask for help on a distribution list, and it turns into a really annoying case of hand-holding. From: X I'm using the XYZ toolset to do some document management, and I want...

View Article

Image may be NSFW.
Clik here to view.

I didn't go to //build/ in San Francisco, but I'll be at RAMP in Budapest

Larry went to //build/, but I didn't. On the other hand, I will be at RAMP in Budapest. I will be presenting (in English) on the evolution of Windows, specifically on the lessons learned over the...

View Article


Image may be NSFW.
Clik here to view.

Why don't elevated processes inherit their environment variables from their...

As a general rule, child processes inherit the environment of their parent. But if the parent is non-elevated and the child is elevated, then this inheritance does not happen. Why not? There are two...

View Article


Image may be NSFW.
Clik here to view.

Why was the Windows source code trunk called the Blue Line?

The nickname doesn't get used much at all any more, but back in the day, the Windows source code trunk was called the Blue Line. Where did it get that name? From the color of the whiteboard pen. When...

View Article

Image may be NSFW.
Clik here to view.

It rather involved being on the other side of this airtight hatchway:...

The Microsoft Vulnerability Research team discovered a potential current directory attack in a third party program. The vendor, however, turned around and forwarded the report to the Microsoft...

View Article

Image may be NSFW.
Clik here to view.

A program for my nieces: The ABCs, part 1

I'm going to spend the next few weeks developing a Little Program in several parts. This is a program I wrote for my nieces, who always wanted to play with my laptop (instead of playing with me)....

View Article

Image may be NSFW.
Clik here to view.

It really wasn't that fancy a Swedish sentence

I dreamed that I was on vacation with my family at a cabin in the woods. I went downstairs with my elder child, and in the playroom I saw another family who are good friends of ours. I guess they...

View Article


Image may be NSFW.
Clik here to view.

The credit card with a half-million-dollar credit limit

Corporate policies for acquiring hardware typically require going through a bunch of procedures, like issuing purchase orders, getting appropriate approvals, all the usual red tape with the purpose of...

View Article

Image may be NSFW.
Clik here to view.

Why is the syntax for touching a file from the command prompt so strange?

The magic incantation for updating the last-modified date on a file is COPY /B FILE+,, What strange syntax! What's with the plus sign and the commas, anyway? The formal syntax is the much more...

View Article


Image may be NSFW.
Clik here to view.

Where is this CRC that is allegedly invalid on my hard drive?

If you're unlucky, your I/O operation will fail with ERROR_CRC, whose description is "Data error (cyclic redundancy check)." Where does NTFS keep this CRC, what is it checking, and how can you access...

View Article

Image may be NSFW.
Clik here to view.

If you want to track whether the current thread owns a critical section, you...

You may find yourself in the situation where you want to keep track of the owner of a critical section. This is usually for debugging or diagnostic purposes. For example, a particular function may...

View Article


Image may be NSFW.
Clik here to view.

A program for my nieces: The ABCs, part 2, choosing a font

I added a feature to my ABC program that it turns out I never actually used: Change the font. I added this in case my nieces were somehow unhappy with the font I chose, and this was a little escape...

View Article

Image may be NSFW.
Clik here to view.

Watch out for those out-of-control Canadian tour buses

I don't remember the details, but I dreamed about a bunch of things, including careening through Canada on a tour bus trying to catch a ferry while people worried about their cell phone roaming...

View Article

Image may be NSFW.
Clik here to view.

Microspeak: Landing, especially the heated kind

Work on Windows occurs in several different branches of the source code, and changes in one branch propagate to other branches. When talking about a feature or other task becoming visible in a branch,...

View Article
Browsing all 3085 articles
Browse latest View live