The Old New Thing

Consequences of the Explorer view model: If you create a view, then you succeeded, even if you’d rather fail

Commenter Anonymous asked why navigating to a drive with no media displays a dialog instead of showing the error message in the view. This is an unfortunate consequence of Explorer's browser/view model. The shell browser binds to the and asks for the view by calling . The view window calls to figure out what to show in the view—and ...

Does version 6 of the common controls support ANSI or not?

I mentioned in passing a few years ago that version 6 of the common controls supports only Unicode. And then other people stepped in to say, "Well, XYZ uses ANSI and that works for me." So does it support ANSI or doesn't it? It does and doesn't. All of the controls in the common controls library are internally Unicode. But not all ...

Working with ambiguous and invalid points in time in managed code

Public Service Announcement: Daylight Saving Time ends in most parts of the United States this weekend. I pointed out some time ago that Win32 and .NET deal with daylight saving time differently. Specifically, Win32 always deals with the time zone you are currently in (even if it's not the time zone that corresponds to the timestamp you are...

If you don’t want to try to repair the data, then don’t, but you should at least know that you have corrupted data

When I wrote about understanding the consequences of , I mentioned that one of the possible responses was to try to repair the damage, but some people are suspicious of this approach. Mind you, I'm suspicious of it, too. Repairing corruption is hard. You have to anticipate the possibility, create enough of a trail to be able to reconstruct...

Sucking the trap frame out of a kernel mode stack trace

If you are placed in the unfortunate position of having to debug a user-mode crash from kernel mode, one of the first things you have to do is get back to the exception on the user-mode side so you can see what happened. We saw earlier how you can get symbols for operating system binaries to help you suck the exception pointers out of a user...

Why can’t you thunk between 32-bit and 64-bit Windows?

It was possible to use generic thunks in 16-bit code to allow it to call into 32-bit code. Why can't we do the same thing to allow 32-bit code to call 64-bit code? It's the address space. Both 16-bit and 32-bit Windows lived in a 32-bit linear address space. The terms 16 and 32 refer to the size of the offset relative to the selector...