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

Image may be NSFW.
Clik here to view.

Hidden gotcha in the thread pool sample program on MSDN

There's a hidden gotcha in the MSDN thread pool sample that one of our interns stumbled across. "I am trying to create a simple thread pool rather than creating a new thread for each task I want to...

View Article


Image may be NSFW.
Clik here to view.

A question about how to detect whether Windows Update needs the system to be...

A customer wanted to know whether there was a way to detect that Windows Update has recently installed an update that requires a reboot. They explained that their computers are running dedicated...

View Article


Image may be NSFW.
Clik here to view.

Why did disabling interrupts cause Windows 95 to hang?

One of the ways people used to demonstrate the awfulness of Windows 95 was that you could hang the system with this simple two-instruction MS-DOS program: cli jmp $ The cli instruction disabled...

View Article

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

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


How can I append to a file and know where it got written, even if the file is...

A customer had a collection of processes, all of which are writing to a single file. Each process wants to append some data to a file and also know where the appended data was written, because the...

View Article

In order to serve you better: Charging your credit card in your home currency

Dynamic currency conversion is a service provided by merchants when processing credit cards payable in a foreign currency. Say, for example, you present a credit card issued by a United States bank to...

View Article

Enumerating all the programs that can open a particular file extension

Today’s Little Program enumerates all the applications which are registered for a particular file extension and lets the user choose one. We then open a file with that chosen program. As always,...

View Article


What does Ctrl+Enter mean? It depends on whom you ask

One of my colleagues was baffled by why Outlook displayed this message: Microsoft Outlook ⚠ You pressed CTRL + ENTER. Do you want to use CTRL + ENTER as a keyboard shortcut for sending a message? ☐ Do...

View Article


Hidden gotcha in the thread pool sample program on MSDN

There’s a hidden gotcha in the MSDN thread pool sample that one of our interns stumbled across. “I am trying to create a simple thread pool rather than creating a new thread for each task I want to...

View Article

A question about how to detect whether Windows Update needs the system to be...

A customer wanted to know whether there was a way to detect that Windows Update has recently installed an update that requires a reboot. They explained that their computers are running dedicated...

View Article

Why did disabling interrupts cause Windows 95 to hang?

One of the ways people used to demonstrate the awfulness of Windows 95 was that you could hang the system with this simple two-instruction MS-DOS program: cli jmp $ The cli instruction disabled...

View Article

Enumerating all the programs that can launch a particular protocol

Today’s Little Program is a variation on the one from last time. This time, instead of enumerating all the handlers for a file extension, we enumerate all the handlers for a protocol. We then open a...

View Article


How do I register a command on the desktop background context menu? (And how...

To register a command to appear on the context menu for the desktop background, you put it under the predefined shell object Desktop­Background. (For some reason, this predefined object is not on the...

View Article

Why doesn’t findstr use the standard regular expression library?

Tim wonders why there isn’t a standard library that was settled on and used by everyone by now. (While you’re at it, why isn’t there a standard for electrical outlets that was settled on and used by...

View Article


Why does OpenProcess return access denied, even if I enable debug privilege?

Many customers ask something like this: We want to get the creation time of a process, but our call to Open­Process fails with ERROR_ACCESS_DENIED. struct KernelHandleDeleter { public...

View Article

Hasn’t the problem of updates being partially installed until the next reboot...

Last week, I discussed how A question about how to detect whether Windows Update needs the system to be restarted turns out to be the wrong question. One of the issues I noted was the risk of the...

View Article


Calculating integer factorials in constant time, taking advantage of overflow...

For some reason, people on StackOverflow calculate factorials a lot. (Nevermind that it’s not necessarily the best way to evaluate a formula.) And you will see factorial functions like this: int...

View Article

Great moments in forgetfulness: Does anybody have a copy of this file?

A colleague of mine (let’s call him Bob) sent out a question to the rest of the team: Does anybody have a copy of xyz.exe? I replied, Hi, Bob. I found a copy on \\scratch\temp\bob\xyz.exe (A few years...

View Article

You’d think that with the name TEMP, people wouldn’t expect it to be around...

A customer had a problem with the Disk Cleanup wizard. The customer liaison explained: The customer would like to know what locations the Disk Cleanup wizard removes files from. The custom is running...

View Article
Browsing all 1765 articles
Browse latest View live


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