The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Why don't all of my folder customizations roam with my profile?
A customer reported some inconsistency in how folder customizations are handled by roaming profiles. Why doesn't the customization roam? Well, if you think about it, it makes sense that the setting for doesn't roam because doesn't roam either! The on Server1 is not the same directory as the on Server2. Let's change Step 2 slightly: I think nobody would be surprised at the results of this second experiment. The changes to Library\Documents are there because that folder is part of your roaming profile. The changes to are there because it is a global resource. And the changes to are not there...
Microsoft Dynamics in a soda can, sort of
It is not uncommon for a product team to produce some custom soda cans (really, carbonated water) for distribution at Microsoft cafeterias. Last year, the Microsoft Dynamics™ CRM 2011 team put some custom cans of sparkling water in the coolers extoling the virtues of their new product. It took the form of a side-by-side feature comparison. They didn't stop at soda cans. They also branded the napkin dispensers. (The napkin dispensers have a clear panel in which a message can be inserted.) (I changed the URLs from an internal Web site to the public Microsoft Dynamics™ CRM Web site.)
Fabio coming to Redmond. Also: Whey Protein
Mark your calendars: Fabio Lanzoni, better known to the world as simply Fabio, will be at the Redmond Whole Foods Market on June 21 to promote his whey protein product. (Now made with real Fabio!) And unlike Martha, he will let you take a picture of him. By the way, ladies, he's available!
Why do you have to wait for Windows Error Reporting to check for solutions before it restarts the application?
Leo Davidson wonders why you have to wait for Windows Error Reporting to check for solutions before it restarts the application. Why not do the two in parallel? Well, for one thing, when the application restarts, it might freak out if it sees a dead copy of itself. I know for sure that I would freak out if I woke up one morning and saw my own dead body lying next to me. While Windows Error Reporting is checking for a solution, it still has access to the carcass of the crashed application, because it may need to refer to it in order to answer follow-up questions from the server. ("Hey, was version 3.14 of PI.DL...
How can I determine the underlying cause of a EXCEPTION_IN_PAGE_ERROR exception?
A customer was using memory-mapped files and installed an exception handler to log in-page errors in the memory-mapped file region. They wanted to know how they could obtain the real disk error that resulted in the memory manager not being able to page-in the requested data. Finding the answer isn't that hard. A quick search for reveals that the information is provided in the member of the structure. In other words,
Eventually the window manager simply says that enough is enough
Many window manager operations are recursive, and eventually the window manager will simply say that enough is enough when the recursion goes too deep. We've seen this when you nest windows more than 50 levels deep or nest menus more than 25 levels deep, for example. (Note also that these limits may change in the future, so don't rely on being able to walk right up to the edge. Those values came from 32-bit Windows XP; I don't know if the limits have been dropped even further in subsequent versions of Windows, and I'm not sufficiently motivated to find out.) A customer had some code which installed a me...
Don't be helpless: What might be the reason for a "Path not found" error?
Internally at Microsoft, we have a programmer's tool which I will call Program Q. On the peer-to-peer mailing list for Program Q, somebody asked the following question: When I try to do a , instead of opening an editor window where I can modify the template, I get the following error: Can you help resolve this error? Okay, there is already everything you need in the error message. The program even converted the error number to error text for you. You just have to read it and think about what it's telling you. The file is . Therefore the path is . I leave you to determine the next step in ...
Microspeak: Turds
In Microspeak, a turd is a graphics glitch which results in old pixels appearing on the screen when they shouldn't. Perhaps they are not being erased properly, or instead of being erased, they move to an unwanted location. The source of the problem could be failing to mark a region for redrawing after something changed, or it could be that the drawing code ran into a problem and failed to draw over the old pixels. The problem might be that the code whose job it is to remove the object from the screen ran into a problem and didn't actually remove it, resulting in an on-screen object that nobody really is keeping t...
Why does PrintWindow hate CS_PARENTDC? Because EVERYBODY hates CS_PARENTDC!
Commenter kero wants to know why the function hates . (And , and .) Because everybody hates ! (And , and .) We saw earlier that these class styles violate widely-held assumptions about how drawing works. I mean, who would have thought that asking for two device contexts would give you the same one back twice? Or that changes to one device context would secretly modify another (because they're really the same)? Or that a window procedure assumes that it will see only one device context ever? The function is really in a pickle when faced with a window with one of these class styles, because the whole point o...