RSS.Social

The Old New Thing

follow: @[email protected]

Posts

A digression on the design and implementation of Safe­Array­Add­Ref and extending APIs in general

What’s the difference between Safe­Array­Access­Data and Safe­Array­Add­Ref?

C++ has scope_exit for running code at scope exit. C# says “We have scope_exit at home.”

A simple helper function for attaching a progress handler to a Windows Runtime IAsync­Action­With­Progress or IAsync­Operation­With­Progress

On the proper usage of a custom Win32 dialog class

Microspeak: On fire, putting out fires

What was the secret sauce that allows for a faster restart of Windows 95 if you hold the shift key?

How can I get the tab index number from a dialog box control?

When programs assume that the system will never change, episode 4: Stealing strings

Clipping the focus item when looking for its on-screen location, part 3

Clipping the focus item when looking for its on-screen location, part 2

Clipping the focus item when looking for its on-screen location

Using Active Accessibility to find out where the focus item is

Using Active Accessibility to find out where the Windows caret is

How can I find out where the Windows caret is?

Swapping two blocks of memory that reside inside a larger block, in constant memory, refinement

How can you swap two non-adjacent blocks of memory using only forward iterators?

How can you swap two adjacent blocks of memory using only forward iterators?

Swapping two blocks of memory that reside inside a larger block, in constant memory

2025 year-end link clearance

Understanding and mitigating a stack overflow in our task sequencer

Additional notes on color-keyed overlays as a way of doing smooth video rendering

The Gävle Goat (Gävleboken) succumbs in 2025 to a new menace

How can I detect that the system is running low on memory? Or that my job is running low on memory?

Why are we worried about memory access semantics? Full barriers should be enough for anybody

Reading the fine print, episode 4: Holiday promotions

Why is the last letter of my string not making it to the clipboard?

Why does my Ctrl+M accelerator key activate when I press the Enter key?

When irate product support customers demand to speak to Bill Gates

All the other cool languages have try…finally. C++ says “We have try…finally at home.”

A shortcut gives me a weird path for a program shortcut that doesn’t point to the executable, so what is it?

Concluding thoughts on our deep dive into Windows clipboard text conversion

Deducing the consequences of Windows clipboard text formats on UTF-8

Why is the Windows clipboard taking the scenic route when converting from CF_TEXT to CF_OEM­TEXT?

Misunderstanding what the Cricket Celebration Bowl is

The Windows clipboard automatic text conversion algorithm is path-dependent

Resolving an ambiguity in the Windows clipboard automated text conversion table

Studying the various locale mismatch scenarios in Windows clipboard text format synthesis

How does Windows synthesize the CF_LOCALE clipboard format?

How does Windows synthesize CF_UNICODE­TEXT from CF_TEXT and vice versa?

How does Windows synthesize CF_OEM­TEXT from CF_TEXT and vice versa?

How can my process read its own standard output?

How can I read the standard output of an already-running process?

How do I check whether the user has permission to create files in a directory?

Microspeak: Big rocks

How do I get my edit control text to be autoselected when I choose it to be the default focus in my dialog?

How can I have a Win32 drop-down combo box with a read-only edit control?

Message-only windows are for messaging, not as a convenient victim for hosting UI

At what point in the Windows development cycle is it too late to change the text of a translatable string?

The apocryphal origins of the Hot Dog Stand color scheme

Why does XAML break down when I have an element that is half a billion pixels tall?

Maybe somebody can explain to me how weak references solve the ODR problem

In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?

Is Write­Process­Memory faster than shared memory for transferring data between two processes?

Microspeak: Little-r

How can I detect that Windows is running in S-Mode, redux

I can use WM_COPYDATA to send a block of data to another window, but how does it send data back?

Could we use CTAD to simplify the use of WRL’s Callback function?

Non-recursively deleting a binary tree in constant space: Rotating the tree

Behind the scenes on how Windows 95 application compatibility patched broken programs

How did Windows 3.1 distinguish two different programs that happened to share the same executable name?

Non-recursively deleting a binary tree in constant space: Restructuring the tree

Non-recursively deleting a binary tree in constant space: Synthesizing the parent pointer

Non-recursively deleting a binary tree in constant space: Traversal with parent pointers

The Microsoft SoftCard for the Apple II: Getting two processors to share the same memory

Why does SHFormat­Date­Time take an unaligned FILETIME?

Microspeak: turn into a pumpkin

Trying to build a XAML tree in code throws a “No installed components were detected” exception

What to do when you have a crash in the runtime control flow guard check

How did the Windows 95 user interface code get brought to the Windows NT code base?

Dubious security vulnerability: Denial of service by loading a very large file

The early history of the Windows Runtime PropertyValue and why there is a PropertyType.Inspectable that is never used

Windows Runtime design principle: Properties can be set in any order

What makes cheap_steady_clock faster than std::chrono::high_resolution_clock?

Microspeak: The hockey stick on wheels

What about the icons in pifmgr.dll?

Using RAII to remedy a defect where not all code paths performed required exit actions, follow-up

Using RAII to remedy a defect where not all code paths performed required exit actions

Why can you increment a reference count with relaxed semantics, but you have to decrement with release semantics?

I remember taking a screen shot of a video, and when I opened it in Paint, the video was playing in it! What witchcraft is this?

API design principle: Don’t tempt people to divide by zero

The self-assignment principle for Windows Runtime properties: Don’t change behavior based on whether a property has been written to

The self-assignment principle for Windows Runtime properties applies to default values

Windows Runtime API design principles around read-write properties: Idempotence and self-assignment

Remembering the end of support for VRML in Internet Explorer

Code comments should apply to the state of the system at the point the comment “executes”

Can we get weak functions for static linking? The Visual C++ compiler says “We have weak functions at home”

The problem with inferring from a function call operator is that there may be more than one

How do I convert a FILETIME to a C++ clock like std::system_clock or winrt::clock?

Microspeak: Convicted

How can I enumerate the overflow icons in the Notification Area without showing them?

Why didn’t Windows 95 setup install a miniature Windows 95 so that it could be written as a 32-bit program?

Samples note: Use comments to describe what code does, not what you wish the code would do

Why is Windows still tinkering with critical sections?

Another lesson learned from the Windows 98 on-stage USB blue screen

Why was Windows 3.0’s WinHelp called an online help system when it ran offline?