Showing results for February 2012 - Page 2 of 3 - The Old New Thing

Feb 15, 2012
0
0

When does an icon handler shell extension get unloaded?

Raymond Chen
Raymond Chen

A customer had a question about the function. They used the function to obtain the icon for a file, and they discovered that when they asked for the icon of a particular type of file, the shell extension for the associated application was loaded. But unfortunately the third party shell extension is not getting unloaded, maybe because of a bug. Ca...

Code
Feb 14, 2012
0
0

The awesome Valentine's Day gift disguised as an uncreative one

Raymond Chen
Raymond Chen

A few years ago, one of my colleagues wanted to surprise his wife with a new laptop for Valentine's Day. (As a bonus, he set the wallpaper to one of their wedding pictures.) Now, he could just give her a neatly wrapped laptop, but he wanted this one to be a super-surprise. First, he bought a large box of chocolates. He then carefully opened the bo...

Non-Computer
Feb 13, 2012
0
0

Why did the Windows 95 Start button have a secret shortcut for closing it?

Raymond Chen
Raymond Chen

Windows 95 had a strange feature where, if you put focus on the Start button and then hit Alt+- (That's Alt and the hyphen key), you got a system menu for the Start button which let you close it, and then the Start button vanished. Programmerman wondered why this existed. This was not a feature; it was just a bug. The person who first wro...

History
Feb 10, 2012
0
0

Fancy use of exception handling in FormatMessage leads to repeated "discovery" of security flaw

Raymond Chen
Raymond Chen

Every so often, somebody "discovers" an alleged security vulnerability in the function. You can try it yourself: If you run this program under the debugger and you tell it to break on all exceptions, then you will find that it breaks on an access violation trying to write to an invalid address. Did you just find a buffer overflow security v...

Code
Feb 9, 2012
0
0

What is the effect of memory-mapped file access on GetLastError()?

Raymond Chen
Raymond Chen

A customer was using memory-mapped files and was looking for information as to whether access to the memory-mapped data modifies the value returned by . A member of the kernel team replied, "No, memory-mapped I/O does not ever change the value returned by ." That answer is simultaneously correct and wrong, a case of looking at the world through...

Code
Feb 8, 2012
0
0

The path-searching algorithm is not a backtracking algorithm

Raymond Chen
Raymond Chen

Suppose your PATH environment variable looks like this: Suppose that you call intending to load the library at . If the network server is down, the call will fail. Why doesn't it just skip the bad directory in the PATH and continue searching? Suppose the function skipped the bad network directory and kept searching. Suppose that the code w...

Code
Feb 7, 2012
0
0

Microspeak: fit

Raymond Chen
Raymond Chen

In Microspeak, fit is a predicate noun which is never used on its own but always comes with a modifying adjective. For something to be a good fit is for something to be appropriate or suitable for a particular situation. The opposite of a good fit is not a bad fit, because that's pejorative. Rather, something that is not a good fit is referred to ...

OtherMicrospeak
Feb 3, 2012
0
0

The compatibility constraints of error codes, episode 2

Raymond Chen
Raymond Chen

A customer reported an incompatibility in Windows 7: If A: is a floppy drive and they call and there is no disk in the drive, the call fails with the error . Previous versions of Windows failed with the error . Both error codes are reasonable responses to the situation. "The module couldn't be found because the drive is not ready." Programs...

Code
Feb 2, 2012
0
0

When you are looking for more information, it helps to say what you need the information for

Raymond Chen
Raymond Chen

It's often the case that when a question from a customer gets filtered through a customer liaison, some context gets lost. (I'm giving the customer the benefit of the doubt here and assuming that it's the customer liaison that removed the context rather than the customer who never provided it.) Consider the following request: We would like to kn...

Otheremail