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

Image may be NSFW.
Clik here to view.

Don't let more than one process try to read from stdin at the same time

A customer reported a problem with a program that ran a series of other programs in parallel. We have a main program (call it main.exe) that runs a bunch of child processes with stdout and stderr...

View Article


Image may be NSFW.
Clik here to view.

Why does my program still show up in the Programs and Features folder after...

A customer reported that they were having problems with their program entry in the Programs and Features folder (formerly known as Add and Remove Programs, formerly known as Add/Remove Programs). When...

View Article


Image may be NSFW.
Clik here to view.

A feature I didn't even know existed much less had a name: Color hot-track

I hadn't even noticed this until somebody pointed it out: When you hover your mouse over a button in the Windows 7 taskbar which corresponds to a running application, the taskbar button lights up in a...

View Article

Image may be NSFW.
Clik here to view.

GetParent, just as confusing as EnumClaw, but it's an actual function!

The function Enum­Claw, documented as returning "the child or the parent of the window", was a joke, but there's a function whose behavior is just as confusing as the joke function Enum­Claw:...

View Article

Image may be NSFW.
Clik here to view.

What does it mean when my program exits with the message "This application...

You're running your program, and then it suddenly exits with the message This application has requested the Runtime to terminate it in an unusual way. What happened? That message is printed by the C...

View Article


Image may be NSFW.
Clik here to view.

Sure, I'm supposed to pass WT_EXECUTELONGFUNCTION if my function takes a long...

A customer contacted me to tell a story and ask a question. The customer discovered that in their code base, all calls to Queue­User­Work­Item passed the WT_EXECUTE­LONG­FUNCTION flag, regardless of...

View Article

Image may be NSFW.
Clik here to view.

How can I tell whether a window is modal?

A customer wanted a way to determine whether a particular window is modal. They listed a few methods they had tried but found that it didn't work and asked for assistance. As Eric Lippert is fond of...

View Article

Image may be NSFW.
Clik here to view.

What is the API for accessing content on SkyDrive?

The last time I mentioned programmatic access to SkyDrive was last June, where I noted that the interface was given the confusing name Messenger Connect. At least now they renamed it to Live Connect,...

View Article


Image may be NSFW.
Clik here to view.

Online gift ordering + enthusiastic kids at the keyboard + Unicode, wait......

I was completing an online gift order for my young nephew's birthday, and I was in the middle of typing Happy birthday into the gift card message when an enthusiastic child reached for the keyboard...

View Article


Image may be NSFW.
Clik here to view.

The peculiar cadence of executive mail messages

When there's a piece of mail sent from a senior executive to the entire product team, it tends to follow a set pattern. It starts out with a history of Group X and commends them on what a great job...

View Article

Image may be NSFW.
Clik here to view.

Not even making it to the airtight hatchway: Execution even before you get there

Today's dubious security vulnerability comes from somebody who reported that the Load­Keyboard­Layout function had a security vulnerability which could lead to arbitrary code execution. This is a...

View Article

Image may be NSFW.
Clik here to view.

Programmatically controlling which handles are inherited by new processes in...

In unix, file descriptors are inherited by child processes by default. This wasn't so much an active decision as it was a consequence of the fork/exec model. To exclude a file descriptor from being...

View Article

Image may be NSFW.
Clik here to view.

Paint messages will come in as fast as you let them

There is a class of messages which are generated on demand rather than explicitly posted into a message queue. If you call Get­Message or Peek­Message and the queue is empty, then the window manager...

View Article


Image may be NSFW.
Clik here to view.

Microspeak: Offline (noun)

Sure, any noun can be verbed, and any verb can be nouned. But today, we're going to noun an adjective. I have no written citations of this usage; the only report was via a colleague who overheard it...

View Article

Image may be NSFW.
Clik here to view.

Deftly solving compatibility problems by withholding information

One of the continuing compatibility problems that plagued Direct3D was the way it reported texture formats. Historically, the way an application checked which texture formats were available was by...

View Article


Image may be NSFW.
Clik here to view.

How do I determine programmatically whether a particular language is LTR or RTL?

Given an LCID, how does one determine whether the language lays out left-to-right or right-to-left? One suggestion was simply to hard-code the list of known right-to-left languages, and if the...

View Article

Image may be NSFW.
Clik here to view.

How do I get the full path for the target of a shortcut file?

A customer was having trouble obtaining information from a shortcut file. "Here is a sample program that tries to print the target of a shortcut file, but it only gets the file name without a...

View Article


Image may be NSFW.
Clik here to view.

Why is the file size reported incorrectly for files that are still being...

The shell team often gets questions like these from customers: Attached please find a sample program which continuously writes data to a file. If you open the folder containing the file in Explorer,...

View Article

Image may be NSFW.
Clik here to view.

Celebrating the end of the gluttony season, but the effects linger

The Washington State Ferry system has reduced the rated carrying capacity of its fleet because people have gotten fatter: The average weight of an adult passenger has been officially revised from 160...

View Article

Image may be NSFW.
Clik here to view.

Introducing the for-if 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 for-if anti-pattern, also known as "We'll sell you the whole...

View Article
Browsing all 1765 articles
Browse latest View live


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