Showing archive results for 2012

Dec 10, 2012
Post comments count0
Post likes count1

Why do some shortcuts not support editing the command line and other properties?

Raymond Chen
Raymond Chen

Ben L observed that some shortcuts do not permit the command line and other options to be edited. "Where is this feature controlled? Is there a way to override this mode?" This question is echoed by "Anonymous (Mosquito buzzing around)" (and don't think we don't know who you are), who in a huge laundry list of questions adds, "Why does the Gam...

Code
Dec 7, 2012
Post comments count0
Post likes count1

It rather involved being on the other side of this airtight hatchway: Writing to the application directory

Raymond Chen
Raymond Chen

We received a security vulnerability report that went roughly like this: There is a security vulnerability in the X component. It loads from the current directory, thereby making it vulnerable to a current directory attack. Here is a sample program that illustrates the problem. Copy a rogue into the current directory and run the program. ...

Other
Dec 6, 2012
Post comments count0
Post likes count0

Replaying input is not the same as reprocessing it

Raymond Chen
Raymond Chen

Once upon a time, there was an application that received some input and said, "Okay, this input cancels my temporary state. I want to exit my temporary state, but I also want the input that took me out of the temporary state to go to whatever control would have received the input if I hadn't been in the temporary state in the first place." (For exa...

Code
Dec 5, 2012
Post comments count0
Post likes count0

Why do I get notified for changes to HKEY_CLASSES_ROOT when nobody is writing to HKEY_CLASSES_ROOT?

Raymond Chen
Raymond Chen

A customer had a question about the function. We are using it to monitor the tree as follows: If I understand the documentation correctly, this registers for notifications when subkeys are added, deleted, or when values are changed. However, it seems that my event becomes signaled at many other times, for example, when I switch folders in ...

Code
Dec 4, 2012
Post comments count0
Post likes count0

The QuickCD PowerToy, a brief look back

Raymond Chen
Raymond Chen

One of the original Windows 95 PowerToys was a tool called QuickCD. Though that wasn't its original name. The original name of the QuickCD PowerToy was FlexiCD. You'd think that it was short for "Flexible CD Player", but you'd be wrong. FlexiCD was actually named after its author, whose name is Felix, but who uses the "Flexi" anagram as a whi...

History
Dec 3, 2012
Post comments count0
Post likes count0

Have you found any TheDailyWTF-worthy code during the development of Windows 95?

Raymond Chen
Raymond Chen

Mott555 is interested in some sloppy/ugly code or strange workarounds or code comments during the development of Windows 95, like "anything TheDailyWTF-worthy." I discovered that opening a particular program churned the hard drive a lot when you opened it. I decided to hook up the debugger to see what the problem was. What I discovered was...

History
Nov 30, 2012
Post comments count0
Post likes count0

The debugger lied to you because the CPU was still juggling data in the air

Raymond Chen
Raymond Chen

A colleague was studying a very strange failure, which I've simplified for expository purpose. The component in question has the following basic shape, ignoring error checking: There are two parts of the object. One part that is essential to the object's task, and another part that is needed only when updating. The parts related to updating ...

Other
Nov 29, 2012
Post comments count0
Post likes count0

Various ways of performing an operation asynchronously after a delay

Raymond Chen
Raymond Chen

Okay, if you have a UI thread that pumps messages, then the easiest way to perform an operation after a delay is to set a timer. But let's say you don't have a UI thread that you can count on. One method is to burn a thread: Less expensive is to borrow a thread from the thread pool: But both of these methods hold a thread hostage for the d...

Code
Nov 28, 2012
Post comments count0
Post likes count0

Why are there both FIND and FINDSTR programs, with unrelated feature sets?

Raymond Chen
Raymond Chen

Jonathan wonders why we have both and , and furthermore, why the two programs have unrelated features. The program supports UTF-16, which doesn't; on the other hand, the program supports regular expressions, which does not. The reason why their feature sets are unrelated is that the two programs are unrelated. The program came first. As I ...

History
Nov 27, 2012
Post comments count0
Post likes count0

Security vulnerability reports as a way to establish your l33t kr3|)z

Raymond Chen
Raymond Chen

There is an entire subculture of l33t l4x0rs who occasionally pop into our world, and as such have to adapt their communication style to match their audience. Sometimes the adaptation is incomplete. You may have trouble finding the exploit buried in that perl script, because the perl script consists almost entirely of graffiti and posturing ...

Other