Showing results for December 2006 - Page 3 of 4 - The Old New Thing

Dec 11, 2006
0
0

What does an invalid handle exception in LeaveCriticalSection mean?

Raymond Chen
Raymond Chen

Internally, a critical section is a bunch of counters and flags, and possibly an event. (Note that the internal structure of a critical section is subject to change at any time—in fact, it changed between Windows XP and Windows 2003. The information provided here is therefore intended for troubleshooting and debugging purposes and ...

Other
Dec 8, 2006
0
0

Throwing things into a blender and seeing what happens

Raymond Chen
Raymond Chen

Manufacturer of commercial and home blenders Blendtec has produced a marketing web site Will It Blend? which features short videos of the company's CEO and new Internet blending icon Tom Dickson throwing all sorts of unusual objects into one of their blenders, to see what happens. (The videos are also on YouTube, and of course they have a blog, ...

Non-Computer
Dec 8, 2006
0
0

Do not overload the E_NOINTERFACE error

Raymond Chen
Raymond Chen

One of the more subtle ways people mess up is returning when the problem wasn't actually an unsupported interface. The return value has very specific meaning. Do not use it as your generic "gosh, something went wrong" error. (Use an appropriate error such as or .) Recall that the rules for are that (in the absence of catastrophic errors such...

Code
Dec 6, 2006
0
0

The wisdom of seventh graders: What to do with a time machine (part 3)

Raymond Chen
Raymond Chen

(Continuing from part 2.) Here are more sentences from seventh grade time travel essays. Remember, these sentences are not representative of seventh grade writing in general; these are just the funny bits. World History The Future: Most students who travelled to the future wanted to meet themselves. Letter Format: Some students took advan...

Non-ComputerThe wisdom of seventh graders
Dec 6, 2006
0
2

If you let people read a file, then they can copy it

Raymond Chen
Raymond Chen

Here's a question that floated past my view: How do I set the ACLs on a file so users can read it but can't copy it? I can't find a "Copy" access mask that I can deny. If I can't deny copying, I'd at least like to audit it, so I can tell who made a copy of the file. There is no "Copy" access mask because copying is not a fundamental file operati...

Other
Dec 5, 2006
0
0

The wisdom of seventh graders: What to do with a time machine (part 2)

Raymond Chen
Raymond Chen

(Make sure you've read Part 1 for background information.) On the subject of where they would go in a time machine, many students wrote well-thought-out essays, beautifully composed. These sentences below did not come from those essays. I've categorized the snippets roughly by theme, though I had to guess at some of them since the sentences are...

Non-ComputerThe wisdom of seventh graders
Dec 5, 2006
0
0

How do I find all files with at least one space in their name?

Raymond Chen
Raymond Chen

You already know how to do this, you just don't realize it. How do you find files with an "x" in their name? That's right, you use . Now you just have to change that x to a space. And since spaces are command line delimiters, you need to quote the sequence so it gets treated as a single parameter rather than two "*" parameters: Stick in a ...

Tips/Support
Dec 4, 2006
0
0

The wisdom of seventh graders: What to do with a time machine (part 1)

Raymond Chen
Raymond Chen

All the students at a local school were asked to composed an in-class essay on the following topic: "Your science teacher has invented a time machine. You have been selected to take the first trip. Explain in a multi-paragraph letter to your teacher where you will go and why." (Students were given two hours, plus one additional hour upon request. I...

Non-ComputerThe wisdom of seventh graders