Showing results for March 2012 - Page 2 of 3 - The Old New Thing

Mar 19, 2012
0
0

The most exciting part of my morning is catching my bus, specifically, making the transfer

Raymond Chen
Raymond Chen

Note: Transit nerd content. You have been warned. I still rely on One Bus Away to tell me when my bus is coming. Recent changes in bus service means that there is no longer a direct bus from my neighborhood to my work. My basic options are as follows: If you sit and work out the math, the total travel time for all the options is about the s...

Non-Computer
Mar 19, 2012
0
0

Why does holding the Ctrl key when selecting New Task from Task Manager open a command prompt?

Raymond Chen
Raymond Chen

Commenter Adam S wonders why holding the Ctrl key when selecting New Task from Task Manager will open a command prompt. It's a rogue feature. Windows XP introduced visual styles, and one of the tricky parts of debugging visual styles is that if the visual style engine goes berzerk, you can't see anything! One of the problems that the v...

Other
Mar 16, 2012
0
0

Memory allocation functions can give you more memory than you ask for, and you are welcome to use the freebies too, but watch out for the free lunch

Raymond Chen
Raymond Chen

Memory allocation functions like , , , and all have the property that they can return more memory than you requested. For example, if you ask for 13 bytes, you may very well get a pointer to 16 bytes. The corresponding functions return the actual size of the memory block, and you are welcome to use all the memory in the block up to the actual si...

Code
Mar 15, 2012
0
0

Why does the VerQueryValue function give me the wrong file version number?

Raymond Chen
Raymond Chen

A customer was writing a test to verify that their patching system was working properly, but they found that even after the patch was installed, a call to reported that the file was still the original version. Why was the function reporting the wrong version? Recall that the version resource is, well, a resource. And one of the things that happe...

Code
Mar 14, 2012
0
0

How do I get mouse messages faster than WM_MOUSEMOVE?

Raymond Chen
Raymond Chen

We saw some time ago that the rate at which you receive messages is entirely up to how fast your program calls . But what if your program is calling as fast as it can, and it's still not fast enough? You can use the function to ask the window manager, "Hey, can you tell me about the mouse messages I missed?" I can think of two cases where yo...

Code
Mar 13, 2012
0
0

Microspeak: Friction

Raymond Chen
Raymond Chen

In physics, friction is a force that resists motion. In Microspeak, friction is an obstacle which prevents somebody from doing something you want them to do. (The preferred verb phrase for getting over an obstacle is overcoming friction.) There is friction in the system for X that is reduced when developing with Y. Using X reduces friction of so...

Non-ComputerMicrospeak
Mar 12, 2012
0
0

If you have multiple versions of Windows installed, why do they all try to adjust the clock?

Raymond Chen
Raymond Chen

Commenter Martin notes that if you have multiple copies of Windows installed on your machine, then each one will try to adjust the clock when you enter or exit daylight saving time. "I cannot believe that this feature is a bug. Please could you comment this?" This falls into a category of issue that I like to call "So what did you expect?" (This ...

Other
Mar 8, 2012
0
0

Alt text for images are important in email, too

Raymond Chen
Raymond Chen

Apparently the IT department gave up on getting everybody to read email in plain text, and other service departments at Microsoft have moved beyond simply using HTML for markup and started adding banner images to the top of each email message. Because the best way to promote your brand to other parts of the company is to stick a banner logo at th...

Other
Mar 7, 2012
0
0

Why do program files go into the Program Files directory?

Raymond Chen
Raymond Chen

Some of Microsoft's software certification programs (such as the Windows Logo) require that applications set their default installation location to the Program Files directory. What is the reason for this? One technical reason is that this ensures that the directory receives an appropriate default security descriptor. But the Program Files directo...

Other