The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
What is the effect of setting the /3GB switch on my 64-bit Windows machine?
Nothing.
Fake trend watch: Bridesmaid pre-nuptial agreements
The only actual citation was a joke, yet it's a trend?
A shell extension is a guest in someone else's house; don't go changing the carpet
A customer was running into this problem with a shell extension: I am writing a shell namespace extension. I need to get data from a COM server, which requires impersonation via with . As I am just writing an extension into , I am not able to call , anymore from my extension. Is there a way I can start by setting in its COM initialization? I was browsing through web, and seems to take some settings from registry, but couldn't find anything related to this one. First of all, who says that the host process is ? If I open Notepad, then do a File.Open, and then navigate to your shell extension, boom, your sh...
Intelius cancels its cell phone directory, saving me the trouble of having to opt out of it every three months
A few years ago, I wrote about a new cell phone directory that charges $15 to give you incorrect information, and from which you have to renew your opt-out every three months. Well, apparently, less than a year later, due to "complaints from consumers and Verizon Wireless," Intelius decided to discontinue the service. Intelius is back in the news, because they have filed a preliminary prospectus with the SEC for an initial public offering. (According to TechCrunch, this is their second attempt at an IPO.) "It's important to know the history. Many investors looking at his history would be very careful." The pe...
Microspeak: Cookie licking
Now nobody else can have it.
Umpires are the lymphatic system of the baseball diamond
When I go to a baseball game, I try to remember to watch the umpires. They move around in a counter-intuitive way: They don't run toward the ball. They don't run toward the runner. Even when the ball is far away, the umpire runs from what appears to be one irrelevant position on the field to another equally irrelevant position. Yet no matter what eventually happens, there's always an umpire there to make the necessary call. (As opposed to the players on the field, who sometimes forget to cover third base.) That's because the umpires aren't playing the game of baseball as it happens on the field. They're playing...
Where did WIN32_LEAN_AND_MEAN come from?
Commenter asdf wonders where came from. The symbol was introduced in the Windows 95 time frame as a way to exclude a bunch of Windows header files when you include . You can take a look at your file to see which ones they are. The symbol was added as part of the transition from 16-bit Windows to 32-bit Windows. The 16-bit header file didn't include all of those header files, and defining brought you back to the 16-bit Windows philosophy of a minimal set of header files for writing a bare-bones Windows program. This appeased the programmers who liked to micro-manage their header files, and it was a bi...
How does Raymond get rid of his excess pennies?
Commenter Boris mentions that he uses NJ Transit to get rid of his excess pennies. But what do you do if your area isn't served by NJ Transit? I use the self-checkout line at the grocery store. The machine has a slot for accepting coins, and you can drop pennies in there until your arm falls off. I don't do this when the grocery store is crowded, since this holds up the line. (Yes, banks also have change-counting machines, but using the machine is overkill when you have only thirty pennies to get rid of.)
Caches are nice, but they confuse memory leak detection tools
Knowledge Base article 139071 has the technically correct but easily misinterpreted title FIX: OLE Automation BSTR caching will cause memory leak sources in Windows 2000. The title is misleading because it makes you think that Oh, this is a fix for a memory leak in OLE Automation, but that's not what it is. The is the string type used by OLE Automation, and since strings are used a lot, OLE Automation maintains a cache of recently-freed strings which it can re-use when somebody allocates a new one. Caches are nice (though you need to make sure you have a good replacement policy), but they confuse memory leak ...