Showing results for 2012 - Page 31 of 31 - The Old New Thing

Jan 5, 2012
0
0

When DLL_PROCESS_DETACH tells you that the process is exiting, your best bet is just to return without doing anything

Raymond Chen
Raymond Chen

When the function receives a reason code of , the increasingly-inaccurately-named parameter to is used to indicate whether the process is exiting. And if the process is exiting, then you should just return without doing anything. No, really. Don't worry about freeing memory; it will all go away when the process address space is destroyed. Don...

Code
Jan 4, 2012
0
0

Misleading advertisement: Passports or green cards?

Raymond Chen
Raymond Chen

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 green any more). The advertisement was illustrated with a picture of a United States passport. Um, a Green Card is not the same as a passport, nor d...

Non-Computer
Jan 4, 2012
0
0

Creating context menus on menus

Raymond Chen
Raymond Chen

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 and the flag is . Let's demonstrate with a simple program. Start with the scratch program, and add the function just so our context menu can do something. When we receive the me...

Code
Jan 3, 2012
0
0

The new business model: Intentional billing errors

Raymond Chen
Raymond Chen

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 for our struggling economy. (For the record, although I am responsible for maintaining these accounts, I did not open the accounts at the bank in quest...

Non-ComputerExploiting the inattentive
Jan 3, 2012
0
0

Why don't ZIP files have the FILE_ATTRIBUTE_COMPRESSED attribute?

Raymond Chen
Raymond Chen

A customer reported that when they called on a ZIP file, the attribute was not returned. But ZIP files are compressed. Why isn't the attribute being set? Because tells you whether the file was compressed by the file system. It is not a flag which describes the semantics of the bytes stored in the file. After all, the file system doesn't know ...

Tips/Support
Jan 2, 2012
0
0

Exploiting the inattentive: The Xbox Kinect Premium Starter Kit

Raymond Chen
Raymond Chen

The name of the product is the Xbox Kinect™ Premium Starter Kit. The promotional images and box images show an Xbox Kinect device. But if you look closely, you'll see that the Xbox Kinect™ Premium Starter Kit does not come with an Xbox Kinect.

Non-ComputerExploiting the inattentive
Jan 2, 2012
0
0

Why wasn't the Windows 95 shell prototyped on Windows NT?

Raymond Chen
Raymond Chen

Carlos wonders why the Windows 95 shell was prototyped as 16-bit code running on the still-under-development 32-bit kernel, USER, and GDI as opposed to being prototyped as fully 32-bit code on Windows NT. There were a number of reasons, some good, some bad. One reason was that the Windows 95 shell was being developed by the Windows 95 ...

History