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

Image may be NSFW.
Clik here to view.

We know your job is hard, you don't have to show us

Some years ago, I attended a internal presentation where one group was teaching another group how to use their new feature. This particular feature was a "Just plug in the things you want, click the...

View Article


Image may be NSFW.
Clik here to view.

If the cursor clip rectangle is a global resource, how come I can't change it...

A customer reported that the Clip­Cursor function was not working. "The cursor clip rectangle is a shared global resource, so I should be able to change it any time I like. My app installs a global...

View Article


Image may be NSFW.
Clik here to view.

What happened in real-mode Windows when somebody did a longjmp into a...

During the discussion of how real-mode Windows handled return addresses into discarded segments, Gabe wondered, "What happens when somebody does a long­jmp into a discardable segment?" I'm going to...

View Article

Image may be NSFW.
Clik here to view.

How do I obtain the computer manufacturer's name via C++?

The way to get the computer manufacturer and other information is to ask WMI. WMI is much easier to use via scripting, but maybe you want to do it from C++. Fortunately, MSDN takes you through it step...

View Article

Image may be NSFW.
Clik here to view.

Excuses college students use for missing assignments

My father recently retired after over 40 years as a college professor. During that time, he has seen all sorts of lame excuses students offer for missing homework assignments. Eventually, he got tired...

View Article


Image may be NSFW.
Clik here to view.

The case of the mysterious Alternate Data Stream query

A customer was running Windows Server 2003 ("Still in support until 2015!") and they have some custom application that monitors all disk accesses. They noticed that there were a lot of failed...

View Article

Image may be NSFW.
Clik here to view.

The case of the missing context menu verbs

A customer reported that when they right-clicked a batch file, a bunch of commands were missing. For example, Open was gone! Okay, there really isn't much of a story here, because some direct...

View Article

Image may be NSFW.
Clik here to view.

Can you dllexport/dllimport an inline function?

The MSDN documentation on the subject of Defining Inline C++ Functions with dllexport and dllimport was written with compiler-colored glasses. The statements are perfectly true, but they use...

View Article


Image may be NSFW.
Clik here to view.

How do I manually recalculate ACLs on a file based on the containing directory?

A customer wanted to move a file and have it forget all its old ACLs and instead inherit its ACLs from its new location. They found an old article of mine that said If you use SH­File­Operation to...

View Article


Image may be NSFW.
Clik here to view.

Creating a listview with checkboxes on some items but not others

Today's Little Program creates a listview with checkboxes on some items but not other. The LVS_EX_CHECK­BOXES extended style is really just a convenience style. Everything it does you could have done...

View Article

Image may be NSFW.
Clik here to view.

The Dead Grandmother/Exam Syndrome

I draw your attention to this research paper from Professor Mike Adams from Eastern Connecticut State University titled The Dead Grandmother/Exam Syndrome, also published in The Annals of Improbable...

View Article

Image may be NSFW.
Clik here to view.

How do I hit the Win+PrintScreen hotkey if my tablet doesn't have a PrtSc key?

Windows 8 added a new hotkey: Win+PrtSc takes a snapshot of your screen and puts it into the Screenshots folder of your Pictures library. But what if you are on a tablet with no PrtSc key? On tablets,...

View Article

Image may be NSFW.
Clik here to view.

There are so many things that call themselves message queues

There are a whole bunch of things in Windows that call themselves message queues, and none of them have anything to do with each other. There is the window manager message queue, which holds window...

View Article


Image may be NSFW.
Clik here to view.

The curse of the leading zero

Consider the following batch file which tries to decide whether we are in the first or second half of the calendar year. (Assume US-English locale settings.) if %DATE:~4,2% LEQ 6 ( echo First half )...

View Article

Image may be NSFW.
Clik here to view.

Psychic debugging: Why messages aren't getting processed by your message pump

The second parameter to the Get­Message is an optional window handle that is used to tell the Get­Message function to retrieve only messages that belong to the specified window. A filtered Get­Message...

View Article


Image may be NSFW.
Clik here to view.

How do I get a high resolution icon for a file?

Today's Little Program obtains a high resolution icon for a file. Start with our scratch program and make these changes. Remember, Little Programs do little or no error checking. This week's smart...

View Article

Image may be NSFW.
Clik here to view.

Hello Kitty takes a rather inefficient trip to the United States

In the book Hello Kitty Takes a Trip, the title character travels to New York, Florida, Vermont, and Hawaii, in that order. Now, sure, the Traveling Salesman Problem is NP-hard, but you're not even...

View Article


Image may be NSFW.
Clik here to view.

When the Web page says that a tool is not supported, it means that if you...

I file this under the category of People refuse to read what is right in front of them. There used to be a number of utilities available for download which all go by the name PowerToys. And they all...

View Article

Image may be NSFW.
Clik here to view.

What clock do MSG.time and GetMessageTime use?

The MSG structure has a field called time which is a DWORD. There is also a function Get­Message­Time which returns a LONG. Both are documented as returning the time the message was generated, but the...

View Article

Image may be NSFW.
Clik here to view.

Commissioner Bud Selig was named the first recipient of the Commissioner Bud...

In what was sure to have been a stunning surprise, last night, the first annual Commissioner Bud Selig Leadership Award was given out. And the winner was... Allan H. "Bud" Selig! I wonder who will win...

View Article
Browsing all 3085 articles
Browse latest View live


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