Showing results for July 2010 - The Old New Thing

Jul 29, 2010
0
0

Holy cow, those TechReady attendees really love their tchotchkes

Raymond Chen
Raymond Chen

I was at the Ask the Experts event last night at TechReady11, and if I didn't know better, I would have thought the purpose of Ask the Experts was for attendees to wander the room collecting the coolest swag they could get their hands on as quickly as possible. My table was equipped with about two dozen Windows 7 frisbees, and the moment they ...

Other
Jul 29, 2010
0
0

Why is my icon being drawn at the wrong size when I call DrawIcon?

Raymond Chen
Raymond Chen

Some time ago I had a problem with icon drawing. When I tried to draw an icon with it ended up being drawn at the wrong size. A call to confirmed that the icon was 48×48, but it drew at 32×32. The answer is documented in a backwards sort of way in the function, which says at the bottom, To duplicate DrawIcon (hDC, X, Y, hIcon),...

Code
Jul 28, 2010
0
0

The frustration of people who have already decided on the solution and won't let you derail them with your annoying questions

Raymond Chen
Raymond Chen

I illustrate this frustration with an actual mail thread (suitably redacted) which I was an observer to. It's a long thread because that's part of the frustration. From: Adam I am looking for some expert advice here on finding a better solution to our performance problem with Product P. Here are the details. [Here follow the details on a...

Other
Jul 27, 2010
0
0

Hardware backward compatibility: The finicky floppy drive

Raymond Chen
Raymond Chen

I think the behavior is more petulant than finicky, but finicky is alliterative. Back in the days of Windows 95, I was talking with the person responsible for, among other things, the floppy disk driver, and I learned about a particular driver hack that was needed to work around a flaw in a very common motherboard chipset. Apparently the flo...

History
Jul 26, 2010
0
0

Why didn't Windows XP auto-elevate programs beyond those named setup.exe?

Raymond Chen
Raymond Chen

Commenter J-F has a friend who wonders why Windows XP didn't auto-elevate all installers but rather only the ones named setup.exe. (Perhaps that friend's name is Josh, who repeated the question twelve days later.) Remember what the starting point was. In Windows 2000, nothing was auto-elevated. Before adding a feature, you have to kno...

Other
Jul 23, 2010
0
0

MSDN content is also available as a Web service

Raymond Chen
Raymond Chen

Unless you've been living under a rock, by now you know about MSDN's low bandwidth view (aka ScriptFree) and lightweight view. But there are other views too, like PDA view (for when you want to look up MSDN documentation on your phone?), Robot view, printer-friendly view, unstyled HTML view... (See that first link above for more details.) But i...

Other
Jul 23, 2010
0
1

If I'm not supposed to call IsBadXxxPtr, how can I check if a pointer is bad?

Raymond Chen
Raymond Chen

Some time ago, I opined that should really be called and you really should just let the program crash if somebody passes you a bad pointer. It is common to put pointer validation code at the start of functions for debugging purposes (as long as you don't make logic decisions based on whether the pointer is valid). But if you can't use , how can...

Code
Jul 22, 2010
0
0

Things I've written that have amused other people, Episode 7

Raymond Chen
Raymond Chen

A customer asked for advice on how to accomplish something, the details of which are not important, except to say that what they were trying to do was far more complicated than the twenty-word summary would suggest. And I wasn't convinced that it was a good idea, sort of like asking for advice on how to catch a baseball in your teeth or pick all t...

OtherThings I've written that have amused other people