Showing results for History - The Old New Thing

Dec 12, 2003
0
0

Why are structure sizes checked strictly?

Raymond Chen
Raymond Chen

You may have noticed that Windows as a general rule checks structure sizes strictly. For example, consider the MENUITEMINFO structure: Notice that the size of this structure changes depending on whether WINVER >= 0x0500 (i.e., whether you are targetting Windows 2000 or higher). If you take the Windows 2000 version of this structure and pass ...

History
Dec 9, 2003
0
0

Scoble's rant on UI defaults

Raymond Chen
Raymond Chen

Robert Scoble posted an entry in his Longhorn blog on the subject of what the UI defaults should be. It sure has stirred up a lot of controvery. I may pick at the remarks over the upcoming days, but for now I posted responses to two of the comments he kicked up. We recently did a survey of users of al...

History
Dec 8, 2003
0
0

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

Raymond Chen
Raymond Chen

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. The fu...

History
Dec 5, 2003
0
0

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

Raymond Chen
Raymond Chen

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 did t...

History
Dec 1, 2003
0
0

What are these strange values returned from GWLP_WNDPROC?

Raymond Chen
Raymond Chen

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 GetWindowLongPtr,...

History
Nov 21, 2003
0
0

Why isn't Fast User Switching enabled on domains?

Raymond Chen
Raymond Chen

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't ev...

History
Nov 17, 2003
0
1

More stories of bad hardware

Raymond Chen
Raymond Chen

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 contr...

History
Nov 3, 2003
0
1

The long and sad story of the Shell Folders key

Raymond Chen
Raymond Chen

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 regi...

CodeHistory