Showing results for October 4, 2012 - The Old New Thing

Oct 4, 2012
Post comments count0
Post likes count0

An unexpected application of negative numbers to gift-giving

Raymond Chen
Raymond Chen

A college classmate of mine informed me that one of his colleagues had planned his wedding so far in advance that on his negative-first anniversary (i.e., precisely one year before his anticipated wedding date), he gave paper to all of his friends. Said my classmate, "It's too bad that neither of us had been born on his −50th anniversary. ...

Non-Computer
Oct 4, 2012
Post comments count0
Post likes count0

Why does RegOpenKey sometimes (but not always) fail if I use two backslashes instead of one?

Raymond Chen
Raymond Chen

A customer reported that on Windows XP, they observed that their program would very rarely get the error when they passed two backslashes instead of one to the function: After removing C++ escapes, the resulting string passed to is The failure was very sporadic and not reproducible under controlled conditions. Well, first of all, d...

Code