The Old New Thing

If FlushInstructionCache doesn't do anything, why do you have to call it?

If you look at the implementation of FlushInstructionCache on Windows 95, you'll see that it's just a return instruction. It doesn't actually do anything. So why do you have to call it? Because the act of calling it is the whole point. The control transfers implicit in calling a function suffice to flush the instruction cache on a Pentium. ...

Why do I have to return this goofy value for WM_DEVICECHANGE?

To deny a device removal query, you must return the special value BROADCAST_QUERY_DENY, which has the curious value 0x424D5144. What's the story behind that? Well, we first tried following the pattern set by WM_QUERYENDSESSION, where returning TRUE allows the operation to proceed and returning FALSE causes the operation to fail. But when we ...

What are these strange values returned from GWLP_WNDPROC?

GetWindowLongPtr(hwnd, GWLP_WNDPROC) [or GetWindowLong(hwnd, GWL_WNDPROC) if you haven't yet made your code 64-bit compatible] is supposed to return the current window procedure. Why do I sometimes get wacko values? Because sometimes "you can't handle the truth". If the current window procedure is incompatible with the caller of ...

Why isn't Fast User Switching enabled on domains?

Windows XP added a new feature called Fast User Switching which lets you switch between users without having to log off. But this feature is disabled if your computer is joined to a domain. Why? There were several reasons, none of them individually insurmountable, but they added up to quite a lot of work for something IT administrators weren...

More stories of bad hardware

My favorite bad CD-ROM drive from Windows 95 was one where the manufacturer cut a corner to save probably twenty-five cents. The specification for CD-ROM controllers indicates that each can host up to four CD-ROM drives. When you talk to the card, you specify which drive you wish to communicate with. The manufacturer of a certain brand of ...

The long and sad story of the Shell Folders key

When you are attempting to architect an operating system, backwards compatibility is one of the ones you just have to accept. But when new programs rely on app hacks designed for old programs, that makes you want to scream. Once upon a time, in what seems like a galaxy far far away (a Windows 95 beta release known as "M3"), we documented a...

I thought you said people don't know how to read analog clocks

I had mentioned in passing in a comment on 10/10/2003 10:07PM that one of the reasons the clock on the taskbar isn't analog is that some disturbingly high percentage of people (30%? 40%? I forget exactly) do not know how to read an analog clock. Yet there is is in the Longhorn sidebar. ...

When vendors insult themselves

During Windows 95, when we were building the Plug and Play infrastructure, we got an angry letter from a hardware vendor (who shall remain nameless) complaining that we intentionally misspelled their company name in our INF files in a manner that made their company name similar to an insulting word...