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

Image may be NSFW.
Clik here to view.

A trick for finding the correct internal mailing list

Suppose you have a problem and you want to report it to an internal mailing list, but you don't know the correct mailing list to use. Here's a trick that apparently is not that well-known, though...

View Article


Image may be NSFW.
Clik here to view.

Where is the full version of the music that plays when you start Windows 98...

A customer was presumably exercising the unlimited support part of their support contract when they asked, "Where is the full song for the music that plays when you start Windows 98 for the first...

View Article


Image may be NSFW.
Clik here to view.

Windows 95 and Windows NT manage the TEB on x86 differently

Today, a historical note of no consequence. Just a story. The Win32 x86 ABI specifies that the FS register holds a selector which is based at the current thread's TEB. In other words, fs:[n] is the...

View Article

Image may be NSFW.
Clik here to view.

Parsing a string as a 64-bit integer, somehow

Today's Little Program takes a string and tries to parse it as a 64-bit integer in formats that a programmer would likely encounter. Here's a first stab: using System; using System.Globalization;...

View Article

Image may be NSFW.
Clik here to view.

Microspeak: Stretch goal

Recall that Microspeak is not merely for jargon exclusive to Microsoft, but also for jargon that you need to know. A project will set some goals, which are things it intends to accomplish. It may also...

View Article


Image may be NSFW.
Clik here to view.

2015 mid-year link clearance

The semi-annual link clearance is here! Windows 8 comes with a data compression API. I was going to write a Little Program to demonstrate it, but it turns out the MSDN sample pretty much covers it, so...

View Article

Image may be NSFW.
Clik here to view.

How secure are GUIDs? Can I use it to generate passwords?

GUIDs are globally unique identifiers, and given their rather incomprehensible presentation, some people may be tempted to use them (or parts of them) as passwords. For example, one person wondered...

View Article

Image may be NSFW.
Clik here to view.

Is a SID with zero subauthorities a valid SID? It depends whom you ask

Here's an interesting table. FunctionIs Sub­Authority­Count=0 valid?IsValidSidYesConvert­Sid­To­String­SidYesConvertString­­Sid­To­SidNo That last entry creates the unfortunate situation where a SID...

View Article


Image may be NSFW.
Clik here to view.

Why does the BackupWrite function take a pointer to a modifiable buffer when...

The Backup­Write function takes a non-const pointer to the buffer to be written to the file being restored. Will it actually modify the buffer? Assuming it doesn't, why wasn't it declared const? It...

View Article


Image may be NSFW.
Clik here to view.

Trying out all the different ways of recognizing different types of...

Today's Little Program takes a 64-bit integer and tries to interpret it in all the various timestamp formats. This comes in handy when you have extracted a timestamp from a crash dump and want to see...

View Article

Image may be NSFW.
Clik here to view.

Intentionally making the suggestion look nothing like any scripting language,...

In an internal peer-to-peer discussion list for an internal tool I'll call Program Q, somebody asked, How can I query the number of free frobs in every table in my table repository? I suggested that...

View Article

Image may be NSFW.
Clik here to view.

What would be the point of creating a product that can't do its job?

Yuhong Bao for some reason lamented that there is no 32-bit version of Windows Server 2008 R2. Well, duh. Why would anybody want a 32-bit version of a server product? You would run into address space...

View Article

Image may be NSFW.
Clik here to view.

Why is my x64 process getting heap address above 4GB on Windows 8?

A customer noticed that when they ran their program on Windows 8, memory allocations were being returned above the 4GB boundary. They included a simple test program: #include <stdio.h> #include...

View Article


Image may be NSFW.
Clik here to view.

On the various ways of creating large files in NTFS

For whatever reason, you may want to create a large file. The most basic way of doing this is to use Set­File­Pointer to move the pointer to a large position into the file (that doesn't exist yet),...

View Article

Image may be NSFW.
Clik here to view.

Generating different types of timestamps from quite a long way away

Today's Little Program does the reverse of what we had last time. It takes a point in time and then generates timestamps in various formats. using System; class Program { static void TryFormat(string...

View Article


Image may be NSFW.
Clik here to view.

Hazy memories of the Windows 95 ship party

One of the moments from the Windows 95 ship party (20 years ago today) was when one of the team members drove his motorcycle through the halls, leaving burns in the carpet. The funny part of that...

View Article

Image may be NSFW.
Clik here to view.

Why doesn't the Print command appear when I select 20 files and right-click?

This is explained in the MSDN documentation: When the number of items selected does not match the verb selection model or is greater than the default limits outlined in the following table, the verb...

View Article


Image may be NSFW.
Clik here to view.

Why do I get ERROR_INVALID_HANDLE from GetModuleFileNameEx when I know the...

Consider the following program: #define UNICODE #define _UNICODE #include <windows.h> #include <psapi.h> #include <stdio.h> // horrors! mixing C and C++! int __cdecl wmain(int,...

View Article

Image may be NSFW.
Clik here to view.

What did the Ignore button do in Windows 3.1 when an application encountered...

In Windows 3.0, when an application encountered a general protection fault, you got an error message that looked like this: Application error CONTOSO caused a General Protection Fault in module...

View Article

Image may be NSFW.
Clik here to view.

How can I detect whether a keyboard is attached to the computer?

Today's Little Program tells you whether a keyboard is attached to the computer. The short answer is "Enumerate the raw input devices and see if any of them is a keyboard." Remember: Little Programs...

View Article
Browsing all 3085 articles
Browse latest View live


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