Showing archive results for 2012

Apr 25, 2012
Post comments count0
Post likes count1

How do I prevent users from opening TIF files?

Raymond Chen

A customer had a question about their Windows XP installations. (This question was from several years ago, so the fine details aren't really relevant any more, but I'm actually telling this story for a commentary opportunity.) The customer wanted to disable all file associations for TIFF files. Their first attempt was by deleting and . Thi...

Tips/Support
Apr 24, 2012
Post comments count0
Post likes count1

I thought I was so clever, salvaging an old floppy drive from a dead computer, but I didn't think *two* steps ahead…

Raymond Chen

When one of the oldest computers at Microsoft still doing useful work finally died, I had the presence of mind to salvage the 5¼″ floppy drive from the machine, so that I could (someday) extract the data off all the old 5¼″ floppy discs I have packed away in boxes meaning to convert someday. (Mind you, the data capacity o...

Other
Apr 23, 2012
Post comments count0
Post likes count1

Why are programs allowed to use normal characters as hotkeys?

Raymond Chen

alv wonders why programs are allowed to create hotkeys for normal characters. The example given is the famous AltGr modifier, equivalent to Ctrl+Alt. Programs which ignore the guidance and use Ctrl+Alt as a shortcut modifier end up stealing keys from many non-English keyboard layouts, thereby preventing users from typing things like the Euro sign...

Other
Apr 20, 2012
Post comments count0
Post likes count1

What does INIT_ONCE_CTX_RESERVED_BITS mean?

Raymond Chen

Windows Vista adds the One-Time Initialization family of functions which address a common coding pattern: I want a specific chunk of code to run exactly once, even in the face of multiple calls from different threads. There are many implementations of this pattern, such as the infamous double-checked lock. The double-checked lock is very easy to...

Code
Apr 19, 2012
Post comments count0
Post likes count1

Why don't I get a Caps Lock warning balloon any more?

Raymond Chen

A customer asked for help diagnosing a problem they were experiencing on Windows XP: My customer reports that on their machines, they do not get the warning balloon that appears when Caps Lock is set while you are typing into a password field. I searched for relevant KB articles but couldn't find anything related to that. Can you help? Time...

Other
Apr 18, 2012
Post comments count0
Post likes count1

Why doesn't the Version tab show up for very large files?

Raymond Chen

If you have a really large file and try to view its properties in Explorer, you may find that the Version tab doesn't appear. What's going on? The Version tab uses the family of functions to obtain version information from files. It so happens that the function works by calling and then using functions like to locate the version resource so it...

Tips/Support
Apr 17, 2012
Post comments count0
Post likes count1

There's the kernel, and there's kernel mode – confusing historical terminology

Raymond Chen

A few weeks ago, I mentioned that the kernel folks decided not to expose bonus bytes to applications. Some people were confused by this statement, not for what it said, but for what it implied. "Wait, you're telling me that the heap is implemented in kernel mode?" Let's turn the clock back to 1983. The core components of Windows fell into three ...

Other
Apr 16, 2012
Post comments count0
Post likes count1

Why do we need IsDialogMessage at all?

Raymond Chen

alv wonders why we need the function at all. "All its activity could take place inside the window procedure of the modeless dialog itself", since when it doesn't have focus, it shouldn't be responding to messages anyway. Sure, that works great if the modeless dialog has focus. But it almost never does. What has focus is a control inside the mode...

Code
Apr 13, 2012
Post comments count0
Post likes count1

You already know the answer since you do it yourself

Raymond Chen

A customer was writing a program that performed virtual drag/drop. They were using the technique but found that many applications don't support drag/drop of virtual content. They support only . What's more, often these applications query for on not because they want to access the file, but just because they want to get the file names (for examp...

Code