Why don't ZIP files have the FILE_ATTRIBUTE_COMPRESSED attribute?
A customer reported that when they called GetFileAttributes on a ZIP file, the FILE_ATTRIBUTE_COMPRESSED attribute was not returned. But ZIP files are compressed. Why isn't the...
View ArticleThe new business model: Intentional billing errors
Just in the last month, I had to call a bank to reverse four erroneous "Account Maintenance Fees" across two different accounts. It appears that intentional billing errors is the new business model...
View ArticleCreating context menus on menus
Last week we looked at menu drag/drop. Another little-used menu feature added in Windows 2000 is the ability to show context menus on menus. The message is WM_MENURBUTTONUP and the flag is...
View ArticleMisleading advertisement: Passports or green cards?
I happened to spot an online advertisement for a company that will help you enter the lottery for a United States Permanent Resident Card, commonly known as a Green Card (even though they card isn't...
View ArticleWhen DLL_PROCESS_DETACH tells you that the process is exiting, your best bet...
When the DllMain function receives a reason code of DLL_PROCESS_DETACH, the increasingly-inaccurately-named lpReserved parameter to is used to indicate whether the process is exiting. And if the...
View ArticleA joke for mathematicians: On the Weyl schism
In one of my mathematics classes, the professor noted (and freely admitted that the joke was not original with him), "There are essentially two groups of mathematicians: Those that have read Weyl and...
View ArticleWhy did HeapFree fail with ERROR_POSSIBLE_DEADLOCK?
A customer reported that they were receiving some assertion failures because the HeapFree function was failing with what they believed to be a valid heap block, and the GetLastError function...
View ArticleIt must totally suck to live near Abbey Road
I feel sorry for the people who live near Abbey Road or who have to take that road as part of their daily routine, because tourists keep blocking traffic to recreate the cover of the eponymous Beatles...
View ArticleWhat were some of the abandoned features of Explorer back in its prototype days?
Chris asked for some stories about what Explorer was like in the early days. Well, one thing is that the original name of Explorer was Cabinet, continuing the folder/document metaphor by taking all...
View ArticleFrom the research journal Duh: To lose weight, eat less
Researchers have determined that the key to losing weight is to consume fewer calories. Okay, it's actually more interesting than the summary suggests. The researchers compared a variety of different...
View ArticleYou can use backups for things other than restoring
A customer wanted to know the internal file format of Visual SourceSafe databases. (That wasn't the actual question, but I've translated it into something equivalent but which requires less...
View ArticleNews flash: Work-at-home job offers are mostly just scams
McClatchy Newspapers discovers, to everyone's surprise, that work-at-home job offers are mostly just scams. Of course, this is something Rob Cockerham discovered years ago. (He also has a rundown of...
View ArticleHow can I detect the language a run of text is written in?
A customer asked, "I have a Unicode string. I want to know what language that string is in. Is there a function that can give me this information? I am most interested in knowing whether it is written...
View ArticleWhat a steal: A house for only ten dollars!
When I was signing the papers for a house purchase many years ago, I noticed that the deed papers read The Grantor «names of people selling the house» for and in consideration of TEN DOLLARS AND OTHER...
View ArticleWhy does CreateEvent fail with ERROR_PATH_NOT_FOUND if I give it a name with...
A customer reported that the CreateEvent function was failing with the unusual error code ERROR_PATH_NOT_FOUND: HANDLE h = CreateEvent(0, FALSE, TRUE, "willy\\wonka"); if (h == NULL) { DWORD dwError...
View ArticlePuzzling out the upsell-o-meter
As I noted before, many grocery stores in the United States have a printer next to the cash register which prints out coupons customized to your purchases. Here's a purchase and the accompanying...
View ArticleHow do I print non-error messages during compilation?
Commenter Worf remarked, "My one wish is that #warning would be supported." I always find it interesting when people say "I wish that Microsoft would stop following standards," since the #warning...
View ArticleKeys duplicated from photo: Delayed reaction
There was a report some time ago that researchers have developed a way to duplicate keys given only a photograph. When I read this story, I was reminded of an incident that occurred to a colleague of...
View ArticleWhy was there a font just for drawing symbols on buttons?
Henke37 wonders why the Marlett font was introduced. Why use a font for drawing symbols on window buttons? Using a font was a convenient way to have scalable graphics. It's not like Windows could've...
View ArticleCultural arbitrage: The food-related sucker bet
While I was at a group dinner at a Chinese restaurant, a whole fish was brought to our table. One of the other people at the table told a story of another time a whole fish was brought to the table....
View Article