Showing archive results for 2010

Oct 11, 2010
Post comments count0
Post likes count1

Why does each drive have its own current directory?

Raymond Chen
Raymond Chen

Commenter Dean Earley asks, "Why is there a 'current directory' AND an current drive? Why not merge them?" Pithy answer: Originally, each drive had its own current directory, but now they don't, but it looks like they do. Okay, let's unwrap that sentence. You actually know enough to answer the question yourself; you just have to put the pieces...

History
Oct 8, 2010
Post comments count0
Post likes count1

Why does TaskDialog return immediately without showing a dialog? – Answer

Raymond Chen
Raymond Chen

Last time, I left an exercise to determine why the function was not actually displaying anything. The problem had nothing to do with an invalid window handle parameter and had all to do with original window being destroyed. My psychic powers told me that the window's handler called . As we learned some time ago, quit messages cause modal loop...

Code
Oct 8, 2010
Post comments count0
Post likes count1

Why does my asynchronous I/O request return TRUE instead of failing with ERROR_IO_PENDING?

Raymond Chen
Raymond Chen

A customer reported that their program was not respecting the flag consistently: My program opens a file handle in mode, binds it to an I/O completion callback function with , and then issues a against it. I would expect that the returns and returns , indicating that the I/O operation is being performed asynchronously, and that the completio...

Code
Oct 7, 2010
Post comments count0
Post likes count1

The overlooked computer room at school that became my "office" for a while

Raymond Chen
Raymond Chen

VIMH's comment on an unmarked restroom that is largely unknown reminds me of a story from my college days. Since my final project involved computational geometry, I was granted a key to the rooms in our department which had the computers with fancy graphical displays. (The term "fancy graphical display" is a relative one, mind you. By today's sta...

Non-Computer
Oct 7, 2010
Post comments count0
Post likes count1

Why does TaskDialog return immediately without showing a dialog?

Raymond Chen
Raymond Chen

A customer reported a problem with the function. We've encountered a strange behavior in the function. A user reported that when exiting our application, our program played an error beep that didn't appear to be associated with an error. After investigating, we found that the sound is coming from our application trying to display an error dialo...

Code
Oct 4, 2010
Post comments count0
Post likes count0

On understanding that getting married comes with changes in lifestyle

Raymond Chen
Raymond Chen

A friend of mine who had been married less than a year received a phone call from Adam, one of his still-single friends: "Hey, Joe! Irving and I are going into town, hit some bars, hang out at some clubs, wanna come along?" My friend replied, "Hang on a second." A beat. "Nope. Still married!" As far as I know, Adam and Irving are still single....

Non-Computer