Showing archive results for 2005

Sep 8, 2005
Post comments count0
Post likes count0

I won’t be signing books but don’t let that stop you

Raymond Chen

Whereas Eric Carter will be signing his book (co-authored with another Eric) at the PDC. I have no book of my own to sign, but will be happy to sign the Erics' book if you ask me to! You can catch me in the Fundamentals Lounge pretty much the whole time. There have been some changes to my talk since I wrote about it last time. The lecture sty...

Other
Sep 8, 2005
Post comments count0
Post likes count2

Why does the function WSASetLastError exist?

Raymond Chen

Why does the function exist when there is already the perfectly good function ? Actually, you know the answer too, if you sit down and think about it. Winsock was originally developed to run on both 16-bit Windows and 32-bit Windows. Notice how the classic Winsock functions are based on window messages for asynchronous notifications. In the...

History
Sep 7, 2005
Post comments count0
Post likes count0

Declared unsuitable for minors in Australia! Sort of.

Raymond Chen

A colleague of mine wrote to let me know Your blog is blocked as "adult content" in the internet cafe I'm currently using in Adelaide, South Australia. Other MSDN blogs show up without problem. You must have really have spiffed up the content since I left the states! Perhaps that should be my new subtitle. "The Old New Thing: Must be 18 or o...

Non-Computer
Sep 7, 2005
Post comments count0
Post likes count1

Why aren’t low-level hooks injected?

Raymond Chen

When I described what the HINSTANCE parameter to the function is for, I neglected to mention why the low-level hooks are not injected. But then again, it should be obvious. The low-level hooks let you see input as it arrives at the window manager. At this low level of processing, the window manager hasn't yet decided what window will receive...

Code
Sep 6, 2005
Post comments count0
Post likes count1

Windows Server 2003 can take you back in time

Raymond Chen

If you are running Windows Server 2003, you owe it to yourself to enable the Volume Shadow Copy service. What this service does is periodically (according to a schedule you set) capture a snapshot of the files you specify so they can be recovered later. The copies are lazy: If a file doesn't change between snapshots, a new copy isn't made. Up to 6...

Tips/Support
Sep 5, 2005
Post comments count0
Post likes count0

Spider Solitaire unseats the reigning champion

Raymond Chen

A few months ago, the usability research team summarized some statistics they had been collecting on the subject of what people spend most of their time doing on the computer at home. Not surprisingly, surfing the Internet was number one. Number two was playing games, and in particular, I found it notable that the number one game is no longer Klond...

Other
Sep 2, 2005
Post comments count0
Post likes count1

Precision is not the same as accuracy

Raymond Chen

Accuracy is how close you are to the correct answer; precision is how much resolution you have for that answer. Suppose you ask me, "What time is it?" I look up at the sun, consider for a moment, and reply, "It is 10:35am and 22.131 seconds." I gave you a very precise answer, but not a very accurate one. Meanwhile, you look at your watch...

Other
Sep 1, 2005
Post comments count0
Post likes count1

More undocumented behavior and the people who rely on it: Output buffers

Raymond Chen

For functions that return data, the contents of the output buffer if the function fails are typically left unspecified. If the function fails, callers should assume nothing about the contents. But that doesn't stop them from assuming it anyway. I was reminded of this topic after reading Michael Kaplan's story of one customer who wanted the ou...

Code
Aug 31, 2005
Post comments count0
Post likes count0

Hoping the worst-case scenario doesn’t come to pass

Raymond Chen

A few years ago, NPR and American RadioWorks ran a story on the consequences to New Orleans of a Category 5 hurricane [NPR part 1] [NPR part 2]. I had been hoping that the city would escape the worst-case scenario of the water topping the levees and submerging the city in twenty feet of water, but yesterday's levee breaches appear to ...

Non-Computer
Aug 31, 2005
Post comments count0
Post likes count1

Understanding hash codes

Raymond Chen

On more than one occasion, I've seen someone ask a question like this: I have some procedure that generates strings dynamically, and I want a formula that takes a string and produces a small unique identifer for that string (a hash code), such that two identical strings have the same identifier, and that if two strings are different, then they wi...

Code