The Old New Thing

Why does COM require output pointers to be initialized even on failure?

One of the rules of COM is that if a parameter is marked as an output pointer, then you have to initialize the thing it points to, even if your function failed and you have nothing to return. For example, we saw the problems that can occur if you forget to set the output pointer to NULL in the IUnknown::QueryInterface method. Why does COM ...
Comments are closed.0 0
Code

Join the Seattle Symphony for a New Year Eve's performance of Beethoven's Nin… wait a second…

One of the regular events of the Seattle Symphony season is a New Year's Eve late night performance of Beethoven's Ninth Symphony followed by a post-concert party to ring in the new year. Last year I received an advertisement in the mail promoting that year's concert, and one page of the brochure contained the message {Ring in the New Year} ...

Even your folder icons can be used as a Rorschach test

Jenny Lam (now at Jackson Fish Market) forwarded me this picture of a USB thumb drive. She also reminded me of another one of those Windows as Rorschach test incidents that surrounded the Windows Vista folder icons. It was reported during one of the betas that the 16×16 folder icon looked like someone flipping the bird. Sure, this ...

How do I minimize a group of windows in Windows 7 from the taskbar?

The Windows 7 taskbar automatically groups similar windows, and when you right-click on the grouped icon, you may get fancy stuff like a jump list or a task list, but you will also get a very small repertoire of window management options. In particular, the only option that operates on the group is Close all windows. What about the other ...

How does the keyboard autorepeat setting work?

Commenter eric johnson wonders how that control panel keyboard autorepeat setting works. This is one of those questions that has many answers, depending on how deep you want to dig. The first layer of the question is how the control panel changes the keyboard autorepeat rate. That's simple: It uses SystemParametersInfo(SPI_SETKEYBOARDSPEED...

Merry Christmas to me: Zune headphones

My article some time back about accidentally destroying my beloved Zune headphones resulted in a number of people sending me their unwanted Zune headphones via inter-office mail. This was not my intention when I posted the article—if that were my goal, I would have posted the article immediately instead of waiting a year and a half!&...

No, you didn't win the Jethro Tull box set, and please tell everybody else in your area code to stop calling me

Some time ago, a fellow employee started receiving mysterious fax calls at the office four or five times a day and had to call the Microsoft telephone services folks to block the caller. But this reminded another colleague of a much more annoying problem, and one for which caller-block would not have worked. A local radio station had a ...

The NPR Planet Money one-hour story competition: The shopping mall convention

Voting closed last night on the second NPR Planet Money one-hour story competition. Three reporters were sent into a convention (this time, the International Council of Shopping Centers conference) and given one hour to collect tape for a story. Listen to the results, either in the full podcast format or just to the three individual stories...

Why don't we create a special class of programs which can break the normal rules?

In response to a discussion of why the window handle limit is 10,000, commenter Juan wondered why we don't create a special class of programs which can exceed the 10,000 handle limit and otherwise bypass the normal operation of the system. This is another case of the tragedy of special treatment: Eventually, nothing is special any more. If...
Comments are closed.0 0
Code

Feedback usabilla icon