Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

If you have multiple versions of Windows installed, why do they all try to...

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...

View Article


Image may be NSFW.
Clik here to view.

Microspeak: Friction

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...

View Article


Image may be NSFW.
Clik here to view.

How do I get mouse messages faster than WM_MOUSEMOVE?

We saw some time ago that the rate at which you receive WM_MOUSE­MOVE messages is entirely up to how fast your program calls Get­Message. But what if your program is calling Get­Message as fast as it...

View Article

Image may be NSFW.
Clik here to view.

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

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 VerQueryValue reported that the file was...

View Article

Image may be NSFW.
Clik here to view.

Memory allocation functions can give you more memory than you ask for, and...

Memory allocation functions like Heap­Alloc, Global­Alloc, Local­Alloc, and Co­Task­Mem­Alloc all have the property that they can return more memory than you requested. For example, if you ask for 13...

View Article


Image may be NSFW.
Clik here to view.

Why does holding the Ctrl key when selecting New Task from Task Manager open...

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...

View Article

Image may be NSFW.
Clik here to view.

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

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...

View Article

Image may be NSFW.
Clik here to view.

In 1993, Microsoft stole my colleague's car

I remember walking between buildings at Microsoft back in the 1990's and seeing a moss-covered, rusted-out jalopy in one of the parking spaces. It clearly hadn't moved in ages. The person I was with...

View Article


Image may be NSFW.
Clik here to view.

Isn't there a race condition in GetFileVersionInfoSize?

In response to my explanation of what the lpdwHandle parameter in Get­File­Version­Info­Size is used for, Steve Nuchia wonders if there's a race condition between the time you get the size and the...

View Article


Image may be NSFW.
Clik here to view.

Why does my window style change when I call SetWindowText?

A customer observed some strange behavior with window styles: We ran some weird behavior: Calling the Set­Window­Text function causes a change in window styles. Specifically, calling Set­Window­Text...

View Article

Image may be NSFW.
Clik here to view.

Why is the Heap32Next function incredibly slow on Windows 7?

A customer observed that the Heap32Function runs much slower on Windows 7 compared to previous versions of Windows. What happened? Set the wayback machine to 1992. The product is Windows 3.1. One of...

View Article

Image may be NSFW.
Clik here to view.

Beverage Gas Division of Central Welding Supply

The other day, I saw a van which was labeled Beverage Gas Division of Central Welding Supply. This odd juxtaposition was created by the acquisition of Compressed Gas Western by Central Welding Supply...

View Article

Image may be NSFW.
Clik here to view.

Why does a maximized window have the wrong window rectangle?

Commenter configurator wonders why the maximum size for a form is the screen size plus (12,12). Somebody else wonders why it's the screen size plus (16,16). Let's start by rewinding the clock to...

View Article


Image may be NSFW.
Clik here to view.

Amusing message on a whiteboard in the hallway

It is common to see whiteboards mounted in hallways. Sometimes they have official purposes; other times they are just placed for the convenience of hallway conversations or impromptu meetings. One of...

View Article

Image may be NSFW.
Clik here to view.

Converting to Unicode usually involves, you know, some sort of conversion

A colleague was investigating a problem with a third party application and found an unusual window class name: L"整瑳整瑳". He remarked, "This looks quite odd and could be some problem with the...

View Article


Image may be NSFW.
Clik here to view.

Why can't I delete a file immediately after terminating the process that has...

A customer discovered a bug where terminating a process did not close the handles that the process had open, resulting in their emergency cleanup code not working: TerminateProcess(processHandle,...

View Article

Image may be NSFW.
Clik here to view.

How do I perform shell file operations while avoiding shell copy hooks?

Okay, the subject line of the article gives away the answer to the puzzle, but here's the puzzle anyway: A customer reported a problem with the SHFile­Operation function: Consider the following...

View Article


Image may be NSFW.
Clik here to view.

If posting here is frequently frustrating and irritating, why do I keep doing...

Appreciator wonders, if I find posting here frequently frustrating and irritating, why I keep doing it anyway? Imagine I announced one day, "This is too frustrating and annoying. I'm going to stop...

View Article

Image may be NSFW.
Clik here to view.

Introducing the unrolled-switch anti-pattern

Over the years, I've seen a bunch of coding anti-patterns. I figured maybe I'll share a few. Today, I'll introduce what I'm calling the unrolled-switch anti-pattern, also known as "Specialization is...

View Article

Image may be NSFW.
Clik here to view.

I totally presented to an executive the wrong way

Some time ago, Gray Knowlton wrote an article on how to present to an executive. As you might have guessed, I've done it completely the wrong way. Many years ago, I was part of a group presenting to a...

View Article
Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>