The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Why don't the file timestamps on an extracted file match the ones stored in the ZIP file?
A customer liaison had the following question: My customer has ZIP files stored on a remote server being accessed from a machine running Windows Server 2003 and Internet Explorer Enhanced Security Configuration. When we extract files from the ZIP file, the last-modified time is set to the current time rather than the time specified in the ZIP file. The problem goes away if we disable Enhanced Security Configuration or if we add the remote server to our Trusted Sites list. We think the reason is that if the file is in a non-trusted zone, the ZIP file is copied to a temporary location and is extracted from there,...
Like a chicken talking to a duck
Many years ago, I called the home of my Chinese-speaking nieces. This was before they started learning English and before I started learning their dialect of Chinese. After the call was over, the eldest niece asked, "Who was that on the phone?" "That was Uncle Raymond." "Oh, I want to talk to Uncle Raymond!" Her mother replied, "That'd be like a chicken talking to a duck." A chicken talking to a duck is a Chinese idiom referring to two people who cannot communicate due to a language barrier. It seems that ducks are somehow central to the concept of language unintelligibility. Is there a duck-related langu...
That's not a duck
One of the audio features added to Windows 7 goes by the formal name stream attenuation, but it is more commonly known to people in the audio world as ducking. Ducking is the process of lowering the volume of background sounds in order to draw more attention to the foreground sound. For example, when you're watching a big battle scene in a summer action movie, your ears are assaulted with the sounds of weapons fire, objects exploding left and right, but when the hero turns to his girlfriend-of-the-moment, the sound level of all the death and destruction drops a bit so you can hear him say something tender,...
The Importance of Being Snooki
What if Jersey Shore were actually a play written by Oscar Wilde? Algernon Moncrieff and Jack Worthing from Broadway's current production of The Importance of Being Earnest explore that premise in a five-part series titled "Jersey Shore" Gone Wilde, drawing its dialogue from things actually said on "Jersey Shore". The dialogue and delivery are funny enough. But what really sells it is the acting: The eye rolls, the nervous glances, the blank stares... Warning: NSFW for crude language, so I didn't embed the videos. You'll have to click through.
Hidden compatibility constraints of redirecting program execution via a stub
One of the "obvious" solutions to the issue of how much work you're willing to do to save 68KB of disk space was to replace one of the copies with a stub that launches the other copy. If you try this obvious solution, you may run into some compatibility issues. First of all, there are programs which launch Notepad and then wait on the process handle so they can wait until the user closes Notepad. Your stub program cannot just do a on the target, because programs which perform a wait will find the wait satisfied when your stub program exits. Okay, so your stub program has to wait for the real copy of Notepa...
Not quite understanding why you wash your hands before playing the piano
My niece wanted to play my piano, and I asked her to wash her hands. She said, "I don't need that, I have Magic Soap," and she produced a bottle of hand sanitizer. Um, the purpose of washing your hands isn't so the piano doesn't get sick. My piano-instructor cousin-in-law tells me that her young students often say, "My hands are not dirty. They are just a little sticky because I just ate a chocolate muffin on my way here. I don't think I need to wash my hands. Why do you always ask me to wash my hands before the piano lesson?"
Why is there a RestoreLastError function that does the same thing as SetLastError?
Matt Pietrek noticed that and do exactly the same thing and wondered why there's a separate function for it. It's to assist in debugging and diagnostics. Say you're debugging a problem and when you call you get . It would really help a lot if you could figure out who set the error code to . If you set a breakpoint on , you find that people call for two different reasons: That second one needs a little explanation. You might have a logging function that goes like this: It's important that functions which perform logging, assertion checking, and other diagnostic operations are nonintrusive. You don...
Microspeak: Hipo
A friend of mind was asked out of the blue, "What does hypo mean?" She started to flash back to high school English class and Greek word roots. "I've started to hear it everywhere. Like Everyone in that meeting is a hypo or We need to reach out to hypos." My friend realized that she had mis-heard the question. It was not about the Greek root hypo but rather the bizarro Microspeak word hipo, shorthand for high-potential employee. As I researched this term (which I had never encountered before), I found that it fell into that special category of Microspeak known as if you have to ask, I'm not going to tell you....
How do I pin a program directly to the Start menu rather than a shortcut?
Anonymous bemoans the fact that pinning programs to the Start menu (in Windows XP) actually pins the shortcut rather than the program itself. This means that if you right-click on a shortcut to pin it, then delete the shortcut, the pinned item stops working. How do you pin the program directly? You pin the program directly by right-clicking on the program directly. If you right-click on a shortcut and select Pin to Start menu, then you're pinning the shortcut. This is sort of obvious, because after all, that's what you right-clicked on. If you want to pin the raw program, then dive into the Program Files f...