The Old New Thing

Charles Petzold is back with another edition of Programming Windows

Back in the day (and perhaps still true today), Charles Petzold's Programming Windows was the definitive source for learning to program Windows. The book is so old that even I used it to learn Windows programming, back when everything was 16-bit and uphill both ways. The most recent edition is Programming Windows, 5th Edition, which was ...

How to view the stack of threads that were terminated as part of process teardown from the kernel debugger

As we saw some time ago, process shutdown is a multi-phase affair. After you call , all the threads are forcibly terminated. After that's done, each DLL is sent a notification. You may be debugging a problem with handling that suggests that some of those threads were not cleaned up properly. For example, you might assert that a reference ...

Sure, we do that: Context menu edition

A customer reported a problem that occurred only when they installed a particular application. If they uninstalled it, then the problem went away. After installing the application, the "Run As" context menu option stopped working. The customer didn't provide any other details, but we were able to make an educated guess as to what was going on...

Microspeak: The parking lot

Mike Dunn wonders what the Microspeak term parking lot means. I'm not familiar with this term either, and the first document I turned up during my search was a PowerPoint presentation that said "Avoid using Microsoft jargon terms, such as parking lot and dogfood." Yeah, that wasn't much help. From what I can gather, the term parking lot ...

Warum deine Mutter Deutsch spricht

This upcoming Sunday is Mother's Day in the United States. In recognition of the holiday last year, a local church displayed the following message on its message board: "God couldn't be / everywhere / so God made mothers / German speaking." This explains why your mother speaks German. POIDH (image) The church in question has an ...

When you crash on a mov ebx, eax instruction, there aren't too many obvious explanations, so just try what you can

A computer running some tests encountered a mysterious crash: A colleague of mine quickly diagnosed the proximate cause. *Something* marked the code page PAGE_READWRITE, instead of PAGE_EXECUTE_READ. I suspect a bug in a driver. FOO is just a victim here. This diagnosis was met with astonishment. "Wow! What made you think to check ...

Cheap amusement: Searching for spelling errors in the registry

One source of cheap amusement is searching for spelling errors in the registry. For example, one program tried to register a new file extension, or at least they tried, except that they spelled wrong. And they wonder why that feature never worked. My discovery was that my registry contained the mysterious key . After some debugging, I ...

How do I hide a window without blocking on it?

A customer was working on improving their application startup performance. They found that if their application was launched immediately after a fresh boot, the act of dismissing their splash screen was taking over 5% of their boot time. Their code removed the splash screen by calling . They suspect that the splash screen thread has, for some ...

Why can't I use the file sharing wizard if I exclude inheritable permissions from a folder's parent?

In Windows Vista and Windows Server 2008, if you go to a the advanced security settings for a directory and uncheck "include inheritable permissions from this object's parent", then go back to the Sharing tab, you'll find that the "Share" button is disabled. Why is this? We don't see this behavior on Windows 7 or Windows Server 2008 ...