Quantcast
Channel: February 2020 - The Old New Thing
Browsing all 10 articles
Browse latest View live

If you plan on keeping the parameter anyway, then there’s no need to have...

Suppose you have a function that takes a std::vector and it wants to take ownership of the vector. You might decide to write two overloads: class Widget { public: void SetValue(std::vector<int>...

View Article



If you’re not keeping the parameter, then you still want to have separate T...

Last time, I noted that if you plan on keeping the parameter anyway, then there’s no need to have separate T const& and T&& overloads. However, the converse also applies: If you’re not...

View Article

Why you might need additional control over the secret event hiding inside the...

Some time ago, I noted that the Set­File­Completion­Notification­Modes function provides a small amount of additional control over the secret event hiding inside the file object, but I noted that I...

View Article

Why are there trivial functions like Copy­Rect and Equal­Rect?

If you dig into the bag of tricks inside user32, you’ll see some seemingly-trivial functions like Copy­Rect and Equal­Rect. Why do we even need functions for things that could be done with the = and ==...

View Article

The 2020/2021 Seattle Symphony subscription season at a glance

For many years, I’ve put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. At some point, we may...

View Article


The custom-made computers powered by pepperoni pizza

During the development of Windows NT, testing identified that a very specific model of computer from a major manufacturer exhibited a very large number of problems, and the team needed about a dozen of...

View Article

What’s up with the CF_SYLK and CF_DIF clipboard formats?

A customer asked, “Please tell us about the CF_SYLK and CF_DIF clipboard formats and if you have information on the specific format to use.” Okay, let’s start with the first part of the question: What...

View Article

How can I configure my Windows NT service to autostart when the system gains...

When configuring a Windows NT service, you can set the SERVICE_TRIGGER_INFO to include a SERVICE_TRIGGER that uses the SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITY trigger, so that it starts and stops...

View Article


How to save a lot of money on cable car tickets in San Francisco

Say you’re a tourist in San Francisco and want to take a ride on the famous cable cars. You are almost certainly going to get on at the turnaround at the corner of Market Street and Powell Street and...

View Article


Should there be a standard C++ pattern for this? transform_to

I’ve got one type of collection and I want to apply a function to each member of the collection, thereby producing a new collection. Surely there’s a standard pattern for this? In JavaScript, it’s...

View Article
Browsing all 10 articles
Browse latest View live


Latest Images