The Old New Thing

Norway: Pros and cons

For the third year in a row, the United Nations' Development Program has ranked Norway as having the best standard of living in the world. Norwegians beat out all others because of their high levels of education, pay and life expectancy. In a totally unrelated story: Norway world leader in casual sex. Of course, Norway isn't all ...

Varför läser jag svenska?

(Even if you don't read Swedish, you may enjoy the links at the end.) Några personer har frågat mig varför jag läser svenska. Historien börjar för många år sedan. Jag läste tidningen och såg att det fanns avgiftsfria norskalektioner i Ballard kyrkans källaren. (Ballard är...

Is your web site an open relay?

As if there isn't enough to worry about. Everyone knows about the dangers of open SMTP relays. But how many people realize the dangers of an open HTTP relay? Many web sites do arbitrary redirection. If I were a spammer, I could create a link to myself that redirects through some well-known web sites, thereby granting my spam link ...

Links about COM threading models

There have been a few good articles about threading models, one from Eric Lippert and another from Larry Osterman. Go off and read them if you haven't already...

How do the FILE_SHARE_* bits interact with the desired access bits?

It's really not that complicated. If you permit, say, , then you're saying, "I'm okay with other people reading this file while I have it open." And if you leave off the flag, then you're saying, "I do not want other people reading this file while I have it open." Now all that's left to do is work out what that means. So suppose you ...

There are two types of scrollbars

Remember that there are two types of scrollbars. One is the standalone scrollbar control. This one has its own window handle, and consequently can be given focus and all those other fun things you can do with window handles. To manipulate them, pass the handle to the scrollbar control to the appropriate scrollbar function (...

When should your destructor be virtual?

When should your C++ object's destructor be virtual? First of all, what does it mean to have a virtual destructor? Well, what does it mean to have a virtual method? If a method is virtual, then calling the method on an object always invokes the method as implemented by the most heavily derived class. If the method is not virtual, then the ...

Batman and Robin patrolling Whitley

Batman and Robin have been spotted in Whitley, providing valuable services like rescuing damsels in distress (pushing her car to the nearest petrol station), scaring away potential muggers, and even chasing streakers off a football pitch...