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

Image may be NSFW.
Clik here to view.

Changing the conditions under which ReadFile produces fewer bytes than requested

In response to an article on hierarchical storage management, Karellen suggests that the problem could be ameliorated by having the hierarchical storage manager keep the first 4KB of the file online,...

View Article


Image may be NSFW.
Clik here to view.

Sometimes a function returns NULL because NULL really is the answer

A customer reported that sometimes the Get­GUI­Thread­Info function returned a valid window handle, but sometimes it returned all NULLs. DWORD dwThreadId = GetWindowThreadProcessId(hwnd, NULL);...

View Article


Image may be NSFW.
Clik here to view.

Why does the access violation error message put the operation in quotation...

Following up on Why does the access violation error message put the operation in quotation marks? Is it some sort of euphemism? Recall that when an application crashes with an access violation, the...

View Article

Image may be NSFW.
Clik here to view.

Some helper functions for interlocked pointer operations

The pointer-related Interlocked functions all operate on void*. In practice, though, you are operating on typed pointers. Here are some helper functions to save you a bunch of typing....

View Article

Image may be NSFW.
Clik here to view.

I cloned a project, but the new project still groups with the old project on...

Alternate title from a non-programmer point of view: When I copy an executable to another name, sometimes it groups separately, and sometimes it groups with the original. A customer had a product,...

View Article


Image may be NSFW.
Clik here to view.

It's called "proofreading", give it a shot why don't you, episode 2

A Reuters article from last week includes the sentence That annual regulatory filing also introduced a so-called "anti-pledging" provision that prevented further loans to company directors, executives...

View Article

Image may be NSFW.
Clik here to view.

Oh, that's probably why I'm in the Quake credits

Back in 2012, I couldn't remember why I was in the Quake credits. But then the comment from Kristaps pinpointed the most likely reason: The Sys_Page­In function. void Sys_PageIn (void *ptr, int size)...

View Article

Image may be NSFW.
Clik here to view.

Why is January 1 being reported as the last week of the previous year?

A customer (via the customer liaison) reported a problem that occurred when their program was run in Germany. Ah, those pesky Germans. Always causing trouble. In Germany, we find that the week numbers...

View Article


Image may be NSFW.
Clik here to view.

Diagnosing high CPU by studying profiling results, example

A customer asked for assistance determining why their program demonstrated sporadic high CPU. It occurred only at a client location, so they couldn't set up a full debugging environment. They were...

View Article


Image may be NSFW.
Clik here to view.

Exploring the Supercute World of Hello Kitty

There's still time to get to the Hello Kitty Supercute Opening Party at the Experience Music Project, kicking off a four-month exhibition of Everything Hello Kitty. (Here are pictures from the Los...

View Article

Image may be NSFW.
Clik here to view.

How can I get notified when the cursor changes?

Today's Little Program tracks changs to the cursor. You might want to do this as part of instrumentation, in order to see how often the user is staring at an hourglass, for example. (It's easier to...

View Article

Image may be NSFW.
Clik here to view.

The ritual of choosing your next office

The joke at Microsoft is "Don't like your office? Don't worry. You'll be moved to a different one soon." It's not actually that bad, at least not in my experience, but the joke still stands. When a...

View Article

Image may be NSFW.
Clik here to view.

Why is the StartRunNOHOMEPATH policy so very specific about what it does?

The Start­Run­No­HOME­PATH policy affects whether the user's HOME path is the current directory when you run a program from the Run dialog. But that's all it does. DWalker asks, "I wonder why the...

View Article


Image may be NSFW.
Clik here to view.

If You Are The One: The crazy Chinese dating show

My wife watches 非誠勿擾, a Chinese dating game show. The title literally translates as "If not sincere, then do not bother", but that doesn't really convey what the title means. It follows in the Chinese...

View Article

Image may be NSFW.
Clik here to view.

Stupid JavaScript debugging tricks: Abusing the conditional breakpoint

Your favorite JavaScript debugger may very well have a conditional breakpoint facility, and if it does, you can abuse it to do things unrelated to conditional breakpoints. Since conditional...

View Article


Image may be NSFW.
Clik here to view.

Investigating a problem constructing a security descriptor to deny...

A customer had a question about how to set up a security access mask. How can I deny thread-specific access rights to Everyone? Specifically, I want to deny the Everyone group the following rights...

View Article

Image may be NSFW.
Clik here to view.

Playing with synchroninzation barriers

A synchronization barrier is a synchronization object that works like this: A synchronization barrier knows how many threads it is managing. Each thread that calls Enter­Synchronization­Barrier...

View Article


Image may be NSFW.
Clik here to view.

We got around three

In this story about Restoration Hardware's mail order extravagance, there is a little statistic: Industry surveys from groups like the Direct Marketing Association estimate that catalogues get average...

View Article

Image may be NSFW.
Clik here to view.

Clarifying the documentation on wildcards accepted by...

A customer asked for clarification in the documentation for Find­First­File and related functions, such as Find­First­File­Ex and Find­First­File­Transacted Does Find­First­File­Ex support multiple...

View Article

Image may be NSFW.
Clik here to view.

The increasing urgency of a request to fill out a survey

Here are some email messages I received from an automated system. October 20: "This survey must be completed no later than November 14." October 31: "Reminder, this survey must be completed no later...

View Article
Browsing all 3085 articles
Browse latest View live


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