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

Image may be NSFW.
Clik here to view.

What's the difference between an asynchronous PIPE_WAIT pipe and a...

When you operate on named pipes, you have a choice of opening them in PIPE_WAIT mode or PIPE_NOWAIT mode. When you read from a PIPE_WAIT pipe, the read blocks until data becomes available in the pipe....

View Article


Image may be NSFW.
Clik here to view.

Was showing the column header in all Explorer views a rogue feature?

User :( asks whether the Explorer feature that shows the column headers in all views was a rogue feature or a planned one. If it was a rogue feature, it was a horribly badly hidden one. One of the...

View Article


Image may be NSFW.
Clik here to view.

Don't just stand around saying somebody should do something: Be someone

On one of the frivolous mailing lists in the Windows project, somebody spotted some behavior that seemed pretty bad and filed a bug on it. The project was winding down, with fewer and fewer bugs being...

View Article

Image may be NSFW.
Clik here to view.

Why didn't they use the Space Shuttle to rescue the Apollo 13 astronauts?

Many decisions make sense only in the context of history. Much like the moviegoers who were puzzled why NASA didn't just use the Space Shuttle to rescue the Apollo 13 astronauts, computer users of...

View Article

Image may be NSFW.
Clik here to view.

How to turn off the exception handler that COM "helpfully" wraps around your...

Historically, COM placed a giant try/except around your server's methods. If your server encountered what would normally be an unhandled exception, the giant try/except would catch it and turn it into...

View Article


Image may be NSFW.
Clik here to view.

Modality, part 9: Setting the correct owner for modal UI, practical exam

Here's a question that came from a customer. You can answer it yourself based on what you know about modal UI. (If you're kind of rusty on the topic, you can catch up here.) I've left in some...

View Article

Image may be NSFW.
Clik here to view.

The 2011/2012 Seattle Symphony subscription season at a glance

Every year, I put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. As before, you might find it...

View Article

Image may be NSFW.
Clik here to view.

There's a default implementation for WM_SETREDRAW, but you might be able to...

If your window doesn't have a handler for the WM_SET­REDRAW message, then Def­Window­Proc will give you a default implementation which suppresses WM_PAINT messages for your window when redraw is...

View Article


Image may be NSFW.
Clik here to view.

Why does the name of my TEMP directory keep changing?

A customer liaison contacted the shell team with the following request: Subject: Support case: 069314718055994 On two of my customer's machines, he's finding that if he opens %TEMP% from the Start...

View Article


Image may be NSFW.
Clik here to view.

Microspeak: Leverage

At Microsoft, leverage is not a term of physics whereby a force can be magnified by the application of mechanical advantage. It is also not a term of finance whereby the power of a small amount of...

View Article

Image may be NSFW.
Clik here to view.

How do you obtain the icon for a shortcut without the shortcut overlay?

The easy one-stop-shopping way to get the icon for a file is to use the SHGet­File­Info function with the SHGFI_ICON flag. One quirk of the SHGet­File­Info function is that if you pass the path to a...

View Article

Image may be NSFW.
Clik here to view.

Some remarks on VirtualAlloc and MEM_LARGE_PAGES

If you try to run the sample program demonstrating how to create a file mapping using large pages, you'll probably run into the error ERROR_NOT_ALL_ASSIGNED (Not all privileges or groups referenced...

View Article

Image may be NSFW.
Clik here to view.

Solutions that require a time machine: Making applications which require...

A while ago, I mentioned that there are many applications that rely on WM_PAINT messages being delivered even if there is nothing to paint because they put business logic inside their WM_PAINT...

View Article


Image may be NSFW.
Clik here to view.

There is no longer any pleasure in reading the annual Microsoft injury reports

Microsoft is required by law to file reports on employees who have sustained injuries on the job. They are also required to post the reports in a location where employees can see them. These reports...

View Article

Image may be NSFW.
Clik here to view.

Ready... cancel... wait for it! (part 1)

One of the cardinal rules of the OVERLAPPED structure is the OVERLAPPED structure must remain valid until the I/O completes. The reason is that the OVERLAPPED structure is manipulated by address...

View Article


Image may be NSFW.
Clik here to view.

Ready... cancel... wait for it! (part 2)

A customer had a question about I/O cancellation. They have a pending Read­File­Ex call with a completion procedure. They then cancel the I/O with Cancel­Io­Ex and wait for the completion by passing...

View Article

Image may be NSFW.
Clik here to view.

I am no longer impressed by your fancy new 10,000 BTU hot pot burner

Two years ago, we had a gathering at my house for some friends for hot pot, the traditional way of ringing in the lunar new year (which takes place today). It was actually a bit of a cross-cultural...

View Article


Image may be NSFW.
Clik here to view.

Ready... cancel... wait for it! (part 3)

A customer reported that their application was crashing in RPC, and they submitted a sample program which illustrated the same crash as their program. Their sample program was actually based on the...

View Article

Image may be NSFW.
Clik here to view.

The 2010 Niney Award nominees have been announced

The nominees for the first (annual?) Niney Awards have been announced. The Nineys are an award which recognizes those who have had the greatest impact on the technical/developer community over the...

View Article

Image may be NSFW.
Clik here to view.

The cursor isn't associated with a window or a window class; it's associated...

In my earlier discussion of the fact that changing a class property affects all windows of that class, commenters LittleHelper and Norman Diamond wanted to know "Why is the cursor associated with...

View Article
Browsing all 3085 articles
Browse latest View live