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

Can the MTA thread exit while keeping its COM class registrations alive?

A customer has an app whose main thread is a single-threaded apartment (STA). The app also has a dedicated multi-threaded apartment (MTA) thread whose job is to register some class objects. Right now,...

View Article


Why does my single-threaded program have multiple threads?

You’ve written a simple single-threaded program, but when you look in Task Manager, it says that the program has two or even more threads. What’s going on? Even though your program doesn’t create any...

View Article


My summer vacation: The London Eye

One of the popular tourist attractions in London is the London Eye. When I went to the Web site to pre-order tickets, there was a field for telephone number. It had an up/down spinner. Telephone...

View Article

I set the same ACL with the GUI and with icacls, yet the results are different

A customer found that if they used the GUI and the icacls program to deny Delete permission to a folder, the results were different, even though the resulting ACLs are the same. Create a user, say,...

View Article

The Magical Excel 97 Far East Language Build Screwdriver™

The cluster of Microsoft buildings 16 through 18 were the home of the Microsoft Office team for many, many years. When they moved to Building 7 Building 37, all of the machines in the old build lab...

View Article


The case of the Uuid­Create­Sequential that didn’t use the MAC address

A customer reported that the Uuid­Create­Sequential function was generating UUIDs that did not place the network card’s MAC address in the final bytes of the UUID. Sequentially-generated UUIDs are...

View Article

Why does the Alpha AXP predict a coroutine transfer the way it does?

I noted some time ago that the Alpha AXP has a dedicated branch to coroutine instruction. The behavior of this instruction is to branch to the address held in the specified register, but the...

View Article

How do I make a clone of a Windows Runtime vector in C++/WinRT?

Suppose you have a Windows Runtime vector, either an IVector<T> or an IVector­View<T>, and you want to clone it so that you can operate on the clone without affecting the original. For...

View Article


My summer vacation: Speaking German (wait, what?)

It was during our family summer vacation to England and France that I spoke German out of necessity, rather than doing so just for fun. And I wasn’t even in Germany. We were traveling on the Paris...

View Article


A slightly less brief introduction to COM apartments (but it’s still brief)

The Component Object Model (COM) has this thing called apartments. What are they? I’m going to explain them by going into the history. In the beginning, we had 16-bit Windows. Each process had only one...

View Article

Yo dawg, I hear you like COM apartments, so I put a COM apartment in your COM...

Last time, we learned about COM apartments, with the two main flavors the single-threaded apartment and the multi-threaded apartment. But it turns out you can also create “miniature apartments” inside...

View Article

Setting up private COM contexts to allow yourself to unload cleanly

Last time, we saw how you could use the CLSID_Context­Switcher object to create a private COM context and register your object factory in that context. This allows you to disconnect all proxies to...

View Article

How do you get into a context via IContext­Callback::Context­Callback?

For the past few articles, I’ve been talking about COM contexts and how you can use them to resolve the impasse that is created when the COM programming model requires you to keep your DLL loaded...

View Article


Using contexts to return to a COM apartment later

We’ve been looking at COM contexts lately, and so far all of these COM contexts were custom contexts created for the purpose of being able to bulk-disconnect all objects in them. But there are also the...

View Article

My summer vacation: The Tower of London and Kensington Palace

During our trip to London, we planned to visit Kensington Palace and the Tower of London. It turns out that for many family configurations, an annual membership costs about the same (sometimes even...

View Article


When should I use delayed-marshaling when creating an agile reference?

The Ro­Get­Agile­Reference function lets you specify whether you want the marshaling of the wrapped object to take place eagerly or lazily. Flag Behavior AGILE­REFERENCE_DEFAULT Eager marshaling...

View Article

The automotive emergency kit is not a toy

Back in 1992, Microsoft was small enough (11,542 employees) that the entire company could get together for a meeting in one place. Mind you, that one place was a large multipurpose arena, but at least...

View Article


Not actually crossing the airtight hatchway: Harmless out-of-bounds read that...

A security vulnerability report arrived that went something like this: By passing a specifically malformed payload, an attacker can trigger an out-of-bounds read. By this means, a remote attacker can...

View Article

Not actually crossing the airtight hatchway: Harmless out-of-bounds read that...

A security vulnerability report arrived that went something like this: By passing a specifically malformed payload, an attacker can trigger an out-of-bounds read. By this means, a remote attacker can...

View Article

My summer vacation: Speaking German (wait, what?)

It was during our family summer vacation to England and France that I spoke German out of necessity, rather than doing so just for fun. And I wasn’t even in Germany. We were traveling on the Paris...

View Article
Browsing all 3085 articles
Browse latest View live


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