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

The PowerPC 600 series, part 14: Code walkthrough

Today we're going to take a relatively small function and watch what the compiler did with it. The function is this guy from the C runtime library, although I've simplified it a bit to avoid some...

View Article


Image may be NSFW.
Clik here to view.

The Windows 95 team were proud slackers

During one of the many (many) team meetings during the course of Windows 95, there was a slide that showed something-or-other broken down by job discipline. There was a column for developers, another...

View Article


Image may be NSFW.
Clik here to view.

How do I force the Task Manager window closed whenever it opens?

A customer wanted to close (or at least hide) the Task Manager window whenever it opens. They did so by setting a timer and periodically running this code: void FindAndCloseTaskManager() { HWND...

View Article

The evolution of Windows 8 charms

It's unclear what inspired the name for charms. It may have come from the item of jewelry, or perhaps from wine glass charms which are used at cocktail parties in certain social circles to identify...

View Article

Image may be NSFW.
Clik here to view.

Obsolete Microspeak: TDBN and the six-pack

Windows 8 introduced its own code names. Last time we learned about charms, a term which started out as an internal code name but wound up as the public name for the feature. When you called up the...

View Article


The early history of Windows file attributes, and why there is a gap between...

Let's look at the values for the basic Windows file attributes. There's a gap where 8 should be. FILE_ATTRIBUTE_... Value READONLY 0x00000001 HIDDEN 0x00000002 SYSTEM 0x00000004   0x00000008 DIRECTORY...

View Article

Removing the Terminate­Thread from code that waits for a job object to empty

Some time ago I showed how to wait until all processes in a job have exited. Consider the following code which wants to create a job, put a single process in it, and then return a handle that will...

View Article

That time the Word team hired somebody who never showed up, who turned out to...

During an exchange of stories from the earlier days of Microsoft, I learned about the time the Word team hired somebody who never showed up. It was the late 1980s or maybe early 1990s. The Winword...

View Article


Image may be NSFW.
Clik here to view.

Apparently they know more information about me than me, but dare I ask?

There's this software services company that retweets content from various technology sites, and they end every one with "Want to learn more? Call us at...". What, so they know more about the subject...

View Article


How do I request that my out-of-process COM server run unelevated?

By default, if an elevated process creates an out-of-process COM server, that COM server also runs elevated. The Activate as Activator policy runs the COM server with the same identity as the caller....

View Article

What does it mean for a window to be Unicode?

The Is­Window­Unicode function reports whether the current window procedure expects Unicode window messages. What specifically does this mean? It means that messages like WM_CHAR will report...

View Article

Removing the Terminate­Thread from a DLL that needs to shut down a helper...

Once more we undertake the exercise of designing the Terminate­Thread out of some code. The customer had an instrumentation toolchain. What you did was take your object code and sent it through an...

View Article

How can I conditionally compile based on a preprocessor macro value, while...

Continuing on the extremely sporadic topic of stupid C preprocessor tricks. It is common to have preprocessor macros that control compile-time behavior. C++11 has std::enable_if to conditionally...

View Article


Le Chatelier’s principle in action: Notifications

Some time ago, a configuration change was made to the Windows repo that caused some people (such as me) to receive hundreds of notifications a day related to a process known as the git train. The git...

View Article

How do I get the system to run my program in this very special way?

A customer registered their program to be run automatically under conditions not important to the story. They found, however, that the program didn't work because the program was written with an...

View Article


Anything is a soldering kit if you’re brave enough: The MOnSter 6502

Eric Shlaepfer wrote So, I made a thing. A really big thing. Really big and really crazy. What he created was a working transistor-scale replica of the MOS 6502 processor. Its name: MOnSter 6502....

View Article

Raising the colon off the ground

There's a fine typographical detail in the Windows 8 TDBN. See if you can spot it. In the clock, it says 7∶00. Not 7:00. The colon between the hour and minutes has been raised slightly. People that...

View Article


Why does the Zune HD have the message “For our Princess” on the inside of the...

Inside the Zune HD case is engraved the message For our Princess. The message is a tribute to an administrative assistant on the Zune team who passed away during development of the project. She gained...

View Article

Image may be NSFW.
Clik here to view.

What defines an old-style common dialog?

In the documentation for the OPEN­FILE­NAME structure, there are many references to "old-style" dialogs. What is an old-style dialog, how do you get one, and how is it different from a new-style...

View Article

A lack of species sensitivity when serving pizza to guests

In the wildlife documentary A Day at the Fire Station, Mr. Vesuvio the fox thanks the pig fire fighters for saving his pizzeria by serving them lunch. Lunch consists of a pizza with various toppings:...

View Article
Browsing all 3085 articles
Browse latest View live


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