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

Image may be NSFW.
Clik here to view.

If you're looking for the code that displays a particular dialog box, the...

Suppose you are working in a large or unfamiliar code base and you want to know where the code is that displays a particular dialog box or message box or something. Probably the most direct way of...

View Article


Image may be NSFW.
Clik here to view.

Some reasons not to do anything scary in your DllMain, part 3

In the same week, the shell team was asked to investigate two failures. The first one was a deadlock in Explorer. The participating threads look like this: Thread 1 called Free­Library on a shell...

View Article


Image may be NSFW.
Clik here to view.

Why does the OpenThread function behave differently when the target thread...

A customer discovered strange behavior in the Open­Thread function and wondered whether it was expected. We use the Open­Thread function to obtain a thread handle with...

View Article

Image may be NSFW.
Clik here to view.

Dispelling the myths, rumors, and innuendo surrounding the...

The Query­Performance­Counter function has been the subject of much rumor and innuendo. In response to all the confusion, the kernel folks put together a page which tries to settle the controversy...

View Article

Image may be NSFW.
Clik here to view.

How do I read the "Double-click to open an item (single-click to select)"...

Today's Little Program reports whether the Double-click to open an item (single-click to select) option is selected in the Folder Options dialog. A customer wanted to know how to do this, presumably...

View Article


Image may be NSFW.
Clik here to view.

It's time we face reality, my friends: We're not rocket scientists

During the development of Windows 95, it was common for team members to pay visits to other teams to touch base and let them know what's been happening on the Windows 95 side of the project. It was...

View Article

Image may be NSFW.
Clik here to view.

Where does the Installed Updates control panel get the install date from?

A corporate customer wanted to know where the Installed Updates control panel gets the Installed On information from, because they found that the values were always set to the current date regardless...

View Article

Image may be NSFW.
Clik here to view.

Taking advantage of the fact that the handle returned when you create a...

A customer wanted some help deciding what security attributes to place on an event object intended to be used by multiple security contexts. We have two processes, call them A and B, running in...

View Article


Image may be NSFW.
Clik here to view.

How can I detect that a user's SID has changed and recover their old data?

A customer maintained a database which recorded information per user. The information in the database is keyed by the user's SID. This works out great most of the time, but there are cases in which a...

View Article


Image may be NSFW.
Clik here to view.

It's a trap! Employment documents that require you to violate company policy

One of my colleagues had a previous job involving tuning spam filters and removing objectionable content. Before he could start, he was told that he had to sign a special release. The form said...

View Article

Image may be NSFW.
Clik here to view.

Who wrote the text for the Ctrl+Alt+Del dialog in Windows 3.1?

One of the differences between standard-mode Windows and enhanced-mode Windows was what happened when you hit Ctrl+Alt+Del. Since 16-bit Windows applications are co-operatively multi-tasked, it is...

View Article

Image may be NSFW.
Clik here to view.

Why does the timestamp of a file increase by up to 2 seconds when I copy it...

We saw some time ago that the FAT file system records timestamps in local time to only two-second resolution. This means that copying a file to a FAT-formatted device (typically a floppy drive or a...

View Article

Image may be NSFW.
Clik here to view.

Aha, I have found a flaw in the logic to detect whether my program is running...

Some time ago, I described how to detect programmatically whether you are running on 64-bit Windows, and one of the steps of the algorithm was "If you are a 64-bit program, then you are running on...

View Article


Image may be NSFW.
Clik here to view.

You can use a file as a synchronization object, too

A customer was looking for a synchronization object that had the following properties: Can be placed in a memory-mapped file. Can be used by multiple processes simultaneously. Bonus if it can even be...

View Article

Image may be NSFW.
Clik here to view.

Piping to notepad

In honor of NotepadConf's new KickStarter video, today's Little Program takes its stdin and puts it in a Notepad window. using System; using System.Diagnostics; using System.Windows.Automation; using...

View Article


Image may be NSFW.
Clik here to view.

The wisdom of seventh graders: The emergency survival kit

As a precursor to reading a story about survival, seventh grade students were asked to come up with a list of things they would want to have in their emergency survival kit. Students were specifically...

View Article

Image may be NSFW.
Clik here to view.

Steve Ballmer did not write the text for the blue screen of death

Somehow, it ended up widely reported that Steve Ballmer wrote the blue screen of death. And all of those articles cited my article titled "Who wrote the text for the Ctrl+Alt+Del dialog in Windows...

View Article


Image may be NSFW.
Clik here to view.

I wrote the original blue screen of death, sort of

We pick up the story with Windows 95. As I noted, the blue Ctrl+Alt+Del dialog was introduced in Windows 3.1, and in Windows 95; it was already gone. In Windows 95, hitting Ctrl+Alt+Del called up a...

View Article

Image may be NSFW.
Clik here to view.

The history of Win32 critical sections so far

The CRITICAL_SECTION structure has gone through a lot of changes since its introduction back oh so many decades ago. The amazing thing is that as long as you stick to the documented API, your code is...

View Article

Image may be NSFW.
Clik here to view.

A lie repeated often enough becomes the truth: The continuing saga of the...

HN has been the only major site to report the history of the Windows 3.1 Ctrl+Alt+Del dialog correctly. But it may have lost that title due to this comment thread. I read here that Steve Ballmer wrote...

View Article
Browsing all 3085 articles
Browse latest View live


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