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

Image may be NSFW.
Clik here to view.

Helper functions to make shell bind contexts slightly more manageable

Last time, we learned about the wonderful world of shell bind context strings, and I promised some helper functions to make this slightly more manageable. Here are some helper functions which...

View Article


Image may be NSFW.
Clik here to view.

Customizing item enumeration with IShellItem

If you are using the original IShell­Folder interface, then you can use SHCONTF values to customize how child items are enumerated. But what if you're using IShell­Item? Let's take it one step at a...

View Article


Image may be NSFW.
Clik here to view.

Tip for trying to boost morale: Don't brag about your overseas trips

Once upon a time, a senior manager held a team meeting to address low team morale. Attempting to highlight how important the project was, he opened by saying, "I just got back from 〈faraway country〉,...

View Article

Image may be NSFW.
Clik here to view.

The compiler can make up its own calling conventions, within limits

A customer was confused by what they were seeing when debugging. It is our understanding that the Windows x86-64 calling convention passes the first four parameters in registers rcx, rdx, r8, and r9....

View Article

Image may be NSFW.
Clik here to view.

Color-aware ClearType requires access to fixed background pixels, which is a...

ClearType is a technology that blends text pixels with background pixels with the goal of reducing visual artifacts during text rendering.¹ If you go for the full-meal version of ClearType, it uses...

View Article


Image may be NSFW.
Clik here to view.

Creating a shared memory block that can grow in size

A little-known feature of shared memory blocks in Win32 is that it is possible to resize them, sort of. When you create a shared memory block, you can pass the SEC_RESERVE flag to Create­File­Mapping,...

View Article

Image may be NSFW.
Clik here to view.

Got errands? Now is the time

This upcoming Sunday is the Super Bowl, the championship game for a sport played only in the United States.¹ The entire country stops doing anything when the game is on. This makes it a perfect time...

View Article

Image may be NSFW.
Clik here to view.

Customizing item enumeration with IShellItem, the old-fashioned way

If you are targeting Windows 8 or higher, you can use (STR_ENUM_ITEMS_FLAGS to customize how shell items are enumerated. But what if you need to run on older systems, too? In that case, you will need...

View Article


Image may be NSFW.
Clik here to view.

Another way to make sure nobody sends you feedback

I wanted to report an issue about a problem with our building, let's say that the widget frobnicators were not working. I went to the internal Widget Frobnicators Web site, and it was very pretty,...

View Article


Image may be NSFW.
Clik here to view.

If you wonder why a function can't be found, one thing to check is whether...

One of my colleagues was frustrated trying to get some code to build. "Is there something strange about linking variadic functions? Because I keep getting an unresolved external error for the...

View Article

Image may be NSFW.
Clik here to view.

The SuspendThread function suspends a thread, but it does so asynchronously

Prologue: Why you should never suspend a thread. Okay, so a colleague decided to ignore that advice because he was running some experiments with thread safety and interlocked operations, and suspending...

View Article

Image may be NSFW.
Clik here to view.

Use GFlags to catch the silent killer (silent but deadly)

Suppose you have some process that is mysteriously dying and you can't figure out why. You think that some other process is doing a Terminate­Process but heck if you can figure out who that is....

View Article

Image may be NSFW.
Clik here to view.

Using thread pool cleanup groups to clean up many things at once

Today's Little Program demonstrates thread pool cleanup groups. When you associate a thread pool item with a cleanup group, you can perform bulk operations on the group. That can save you a lot of...

View Article


Image may be NSFW.
Clik here to view.

Staying cool is one of the skills of a corporate president

Some time ago, there was a mechanical problem with the heating/cooling system in our part of the building, and one of the senior managers in our group took the opportunity to tell a story of a...

View Article

Image may be NSFW.
Clik here to view.

Why was the replacement installer for recognized 16-bit installers itself a...

Even though 64-bit Windows does not support 16-bit applications, there is a special case for 16-bit installers for 32-bit applications. Windows detects this scenario and substitutes a 32-bit...

View Article


Image may be NSFW.
Clik here to view.

Who is this rogue operative that filled my object with 0xDD, then sent me a...

A failure occurred during stress testing, and the component team came to the conclusion that their component was actually the victim of memory corruption and they asked for help trying to see if there...

View Article

Image may be NSFW.
Clik here to view.

What is this inconsistent heap state that MSDN warns me about during...

In the MSDN documentation for the Dll­Main entry point, MSDN notes: When handling DLL_PROCESS_DETACH, a DLL should free resources such as heap memory only if the DLL is being unloaded dynamically (the...

View Article


Image may be NSFW.
Clik here to view.

Reading the word under the cursor via UI Automation

A while back, I showed how to use UI Automation to extract the text under the mouse cursor. Let's refine the program so it can extract the word under the cursor. The ability to extract subunits of...

View Article

Image may be NSFW.
Clik here to view.

The 2015/2016 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. For the past several...

View Article

Image may be NSFW.
Clik here to view.

Microspeak: Light up

In Microspeak, a feature lights up if it becomes available in an application when run on an operating system that supports it. The idea is that you write your application to run on, say, Windows...

View Article
Browsing all 1765 articles
Browse latest View live


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