The Old New Thing

Beware of roaming user profiles

One of the less-known features of Windows is the roaming user profile. I know that this is not well-known because I often see suggestions that fail to take the roaming user profile scenario into account. Indeed, if your program behaves badly enough, you can cause data loss. (More on this later.) What is a roaming user profile? Well, your ...
Comments are closed.0 0
Code

Why isn't Windows Setup just a disk reimage plus a registry dump?

Why can't all the registry key needed by Windows Setup be precomputed and splorted at one go? One reason is that Windows Setup can be customized via a so-called "unattend file", which means that a lot of the work cannot be precalculated. Some settings also have cascade effects on other settings. Also, the model for component registration is ...

A simple story in pictures

Professionals at work is the title of this series of unattributed pictures. (Via memepool Nov 26, 2004.) I think they speak for themselves. (I apologize in advance for the lowbrow advertisements on the page...

Drink at work: The blog of a cartoonist

Francesco ("Ces") Marciuliano is the author of the comic strip Sally Forth. In his blog, Drink at Work he expounds on whatever tickles his fancy. (Warning: Includes strong language, adult situations, and political views.) Sure, the stories on writing a cartoon are fun, especially when he responds to feedback from readers, and he also has ...

Why do Microsoft code samples tend to use ZeroMemory instead of { 0 }?

If you go browsing around MSDN, you'll find that code samples tend to call ZeroMemory explicitly rather than using "= { 0 }" notation. Why is that? To make it clearer for people who are used to other programming languages. Like it or not, a significant percentage of people who write programs for Windows do it in languages other than C and C...

Why are there broadcast-based mechanisms in Windows?

Many Windows information mechanisms are based on message broadcasts, among them DDE, WM_FONTCHANGE, and changes in system settings. Why do these mechanisms use broadcasts, when we know that broadcasts can result in the system grinding to a halt due to windows that have stopped processing messages? Because in 16-bit Windows, you didn't have...

Why can't I get the pixels of a window that isn't visible on screen?

If the window isn't visible on the screen, then the pixels simply don't exist. The Windows painting model follows the principle of "Don't save anything you can recalculate". Consider: You have a 640x480 display in 16-color mode. That's 150KB of video memory. Take four copies of Notepad and maximize each one. If each of those copies of ...
Comments are closed.0 0
Code

Why does the CreateProcess function do autocorrection?

Programs that weren't designed to handle long file names would make mistakes like taking the path to the executable and writing it into the registry, unaware that the path might contain a space that needs quoting. (Spaces—while technically legal—were extremely rare in SFN paths.) The CreateProcess function had to decide whether to...

I'll see (some of) you in Los Angeles in September

Jeremy Mazner has asked me to put together a 400-level session at this year's PDC. I came up with the title "Five(ish) things every Win32 developer should know (but likely doesn't)". Of course, now I have to think of five things! Here are some ideas I've been kicking around. Would you go to a talk that covered these topics? If not, what ...

Why does the Run dialog autocorrect but not the Run key?

In an earlier comment, Aswin Gunawan asked why the Run dialog does autocorrection but not the Run key? One is a programmatic interface and the other is an end-user control. End users are not expected to be understand how computers do things. They want, and even expect, the computer to help them out with what they're typing. This means spell...
Comments are closed.0 0
Code

Feedback usabilla icon