Showing archive results for 2012

Sep 17, 2012
Post comments count0
Post likes count1

How do you deal with an input stream that may or may not contain Unicode data?

Raymond Chen

Dewi Morgan reinterpreted a question from a Suggestion Box of times past as "How do you deal with an input stream that may or may not contain Unicode data?" A related question from Dave wondered how applications that use to store data could ensure that the data is interpreted in the same code page by the recipient. "If I send a .txt file to a per...

Code
Sep 14, 2012
Post comments count0
Post likes count1

Raymond learns about some of the things people do to get banned on Xbox LIVE

Raymond Chen

I still enjoy dropping in on Why Was I Banned? every so often, but not being a l33t Xbox haxxor, I don't understand a lot of the terminology. Fortunately, some of my colleagues were kind enough to explain them to me. (And now I'm explaining them to you so that you don't have to look as stupid asking them.) A modded lobby is a pre-game lobby (a se...

Other
Sep 14, 2012
Post comments count0
Post likes count1

IShellFolder::BindToObject is a high-traffic method; don't do any heavy lifting

Raymond Chen

A customer observed that once the user visited their shell extension, Explorer ran really slowly. (Actually, it took a while just to get to this point, but I'll skip the early investigations because they aren't relevant to the story.) Some investigation showed that Explorer's tree view was calling into the shell extension, which was in turn hanging...

Code
Sep 13, 2012
Post comments count0
Post likes count1

WM_CTLCOLOR vs GetFileVersionInfoSize: Just because somebody else screwed up doesn't mean you're allowed to screw up too

Raymond Chen

In a discussion of the now-vestigial parameter to the function, Neil asks, "Weren't there sufficient API differences (e.g. WM_CTLCOLOR) between Win16 and Win32 to justify changing the definitions to eliminate the superfluous handle?" The goal of Win32 was to provide as much backward compatibility with existing 16-bit source code as can be pra...

History
Sep 12, 2012
Post comments count0
Post likes count1

Rogue feature: Docking a folder at the edge of the screen

Raymond Chen

Starting in Windows 2000 and continuing through Windows Vista, you could drag a folder out of Explorer and slam it into the edge of the screen. When you let go, it docked itself to that edge of the screen like a toolbar. A customer noticed that this stopped working in Windows 7 and asked, "Was this feature dropped in Windows 7, ...

History
Sep 11, 2012
Post comments count0
Post likes count1

One for the "They have to say that because of me": Ground rules at the Point Defiance Zoo

Raymond Chen

The ground rules for the Point Defiance Zoo and Aquarium in Tacoma include the usual things you might expect. "No pets." "Do not feed the animals." "No smoking." But then there's a rule that clearly is one about which somebody somewhere in the world can say "They have to say that because of me":

Non-Computer
Sep 11, 2012
Post comments count0
Post likes count1

Why can't I use Magnifier in Full Screen or Lens mode?

Raymond Chen

A customer liaison asked why their customer's Windows 7 machines could run Magnifier only in Docked mode. Full Screen and Lens mode were disabled. The customer liaison was unable to reproduce the problem on a physical machine, but was able to reproduce it in a virtual machine. Full Screen and Lens mode require that desktop composition be ena...

Tips/Support
Sep 10, 2012
Post comments count0
Post likes count1

When you transfer control across stack frames, all the frames in between need to be in on the joke

Raymond Chen

Chris Hill suggests discussing the use of structured exception handling as it relates to the window manager, and specifically the implications for applications which raise exceptions from a callback. If you plan on raising an exception and handling it in a function higher up the stack, all the stack frames in between need to be be in on your li...

Code
Sep 7, 2012
Post comments count0
Post likes count2

The case of the asynchronous copy and delete

Raymond Chen

A customer reported some strange behavior in the and functions. They were able to reduce the problem to a simple test program, which went like this (pseudocode): When they ran the program, they found that sometimes the copy failed on the first try with error 5 () but if they waited a second and tried again, it succeeded. Similarly, somet...

Other
Sep 6, 2012
Post comments count0
Post likes count1

You can't rule out a total breakdown of normal functioning, because a total breakdown of normal functioning could manifest itself as anything

Raymond Chen

A customer was attempting to study a problem that their analysis traced back to the function returning . Is it a valid conclusion that there is no heap corruption? While heap corruption may not be the avenue of investigation you'd first pursue, you can't rule it out. In the presence of a total breakdown of normal functioning, anything can happ...

Code