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

Image may be NSFW.
Clik here to view.

The contents of the Start page are not programmatically accessible

A customer wanted to know if is possible for an application to edit the user's Start page. No, there is no interface for editing the user's Start page or even knowing what is on it. The Start page is...

View Article


Image may be NSFW.
Clik here to view.

Why is the FAT driver called FASTFAT? Why would anybody ever write SLOWFAT?

Anon is interested in why the FAT driver is called FASTFAT.SYS. "Was there an earlier slower FAT driver? What could you possibly get so wrong with a FAT implementation that it needed to be chucked...

View Article


Image may be NSFW.
Clik here to view.

The case of the file that won't copy because of an Invalid Handle error message

A customer reported that they had a file that was "haunted" on their machine: Explorer was unable to copy the file. If you did a copy/paste, the copy dialog displayed an error. 1 Interrupted...

View Article

Image may be NSFW.
Clik here to view.

Applying a filter to the contents of an Explorer Browser

Today's Little Program hosts an Explorer Browser but filters the contents to remove DLL files. You can, of course, substitute your own filter. (For example, maybe you want to show only files that...

View Article

Image may be NSFW.
Clik here to view.

Microspeak: Line of sight

I first encountered this term in a meeting I attended. Q: We would like to be able to reverse the polarity of the neutron flow without requiring a reboot. A: Yes, that is something we've been thinking...

View Article


Image may be NSFW.
Clik here to view.

Passing the incorrect object type for a handle, how bad is it?

A customer asked a somewhat strange question: "We are calling Set­Event but passing the handle to a waitable timer. Application Verifier reports, "Incorrect object type for handle." But the code works...

View Article

Image may be NSFW.
Clik here to view.

How do I get a handle to the primary monitor?

There are various ways of getting a monitor. You can get the monitor from a point, from a rectangle, or from a window. But how do you get the primary monitor? The primary monitor is defined to be the...

View Article

Image may be NSFW.
Clik here to view.

Raymond, why did you stop studying Chinese? It has no grammar!

One of my colleagues, a native Chinese speaker, asked me whether I was still learning Mandarin Chinese. I told him that I had given up. He was baffled by this. "But Chinese is such a simple language....

View Article


Image may be NSFW.
Clik here to view.

Why does an attempt to create a SysLink control in my plug-in sometimes fail?

A customer had written a plug-in for some application, and they found that their plug-in was unable to create a SysLink control via the Create­Window­ExW function. The same code in a standalone...

View Article


Image may be NSFW.
Clik here to view.

Kicking around a function that formats stuff

Today's "Little Program" is really a "Little Puzzle" that got out of hand. This started out as a practical question: This code fragment screams out for some sort of simplification. (I've changed the...

View Article

Image may be NSFW.
Clik here to view.

A little cheat in my Tiger Beat photo homage

One thing nobody has called out in my tribute to the Bill Gates Tiger Beat photo, either because it was too subtle or too obvious, is that the photo is actually a mirror image. The arrangement of...

View Article

Image may be NSFW.
Clik here to view.

How can I wait until all startup applications have finished launching?

A customer wanted to know how to detect that all startup applications have finished launching. They wanted to wait until everything settled down before proceeding with some task. What if two programs...

View Article

Image may be NSFW.
Clik here to view.

When does GetTickCount consider the system to have started?

The Get­Tick­Count and Get­Tick­Count­64 functions return "the number of milliseconds that have elapsed since the system was started." (The 32-bit version wraps around after around 50 days.) But when...

View Article


Image may be NSFW.
Clik here to view.

How to view the stack of a user-mode thread when its kernel stack has been...

Suppose you have a machine that has crashed, and your investigation shows that the reason is that there is a critical section that everybody is waiting for. While waiting for that critical section,...

View Article

Image may be NSFW.
Clik here to view.

How do I enumerate drives the same way that the NET USE command does?

If you use the Remote Desktop Connection client to connect to another computer, you have the option of making your local drives available to the remote computer. A customer wanted to know how to...

View Article


Image may be NSFW.
Clik here to view.

File version information does not appear in the property sheet for some files

A customer reported that file version information does not appear on the Details page of the property sheet which appears when you right-click the file and select Properties. They reported that the...

View Article

Image may be NSFW.
Clik here to view.

Distinguishing between normative and positive statements to help people...

Often, we get questions from a customer that use the word should in an ambiguous way: Our program creates a widget whose flux capacitor should have reverse polarity. Attached is a sample program that...

View Article


Image may be NSFW.
Clik here to view.

A library loaded via LOAD_LIBRARY_AS_DATAFILE (or similar flags) doesn't get...

If you load a library with the LOAD_LIBRARY_AS_DATA­FILE flag, then it isn't really loaded in any normal sense. In fact, it's kept completely off the books. If you load a library with the...

View Article

Image may be NSFW.
Clik here to view.

Is it wrong to call SHFileOperation from a service? Revised

My initial reaction to this question was to say, "I don't know if I'd call it wrong, but I'd call it highly inadvisable." I'd like to revise my guidance. It's flat-out wrong, at least in the case...

View Article

Image may be NSFW.
Clik here to view.

The crazy world of stripping diacritics

Today's Little Program strips diacritics from a Unicode string. Why? Hey, I said that Little Programs require little to no motivation. It might come in handy in a spam filter, since it was popular, at...

View Article
Browsing all 3085 articles
Browse latest View live


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