The Old New Thing
devblogs.microsoft.com/oldnewthing
Practical development throughout the evolution of Windows.
Windows internalsC++Engineering blogsMicrosoft blogsMicrosoft dev blogs
- Posts
- 7,670 from 21 Jul 2003 to 29 Oct 2026
- Posting
- about daily (270 in the last year)
- Kind
- personal blog
- Feed
- https://devblogs.microsoft.com/oldnewthing/feed/
Latest
October 2026
- The support case of a customer who said that all they could see was a black screen
- C++/WinRT overcorrection: Using make_self and immediately converting it to the projected interface
- Why don’t we run the taskbar and Task Manager at high priority, so they can remain responsive?
- Puzzling out why a program doesn’t work when run from a batch file, but works when double-clicked from Explorer
- Why didn’t we use the COM static store to clean up the unmarshalable delegate?
- Why didn’t we use CoRegisterInitializeSpy to clean up the unmarshalable delegate?
- Why didn’t we use RoRegisterForApartmentShutdown to clean up the unmarshalable delegate?
- Microspeak: Drain the slide, back-up slides
- Why do we need ud2 when int 6 is right there?
- C++ futures part 5: std:: future and std:: shared_future
- C++ futures part 4: What if I want an immediate on-thread std::async ?
- C++ futures part 3: The mental model for std::async
- C++ futures part 2: The mental model for std::promise , std::packaged_task
- C++ futures part 1: The mental model
- One way of thinking about access specifiers in C++/WinRT implementation types
- If one anti-malware software is good, does that make two better?
- How can undefined opcodes ud0 and ud1 have parameters? How undefined were they?
- Why does the compiler sometimes use ud2 and sometimes int 3 for code that shouldn’t execute?
- If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts?
- Why is there no Windows hot-patching support for other architectures like 32-bit ARM and MIPS?
- Windows on Itanium also provided for hot-patching, in an even simpler way
September 2026
- Windows on AArch64 also provides for hot-patching, but it’s much simpler than on x86
- As a general rule, calling product support while drunk is not recommended
- C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times
- Debugging walkthrough: Access violation on nonsense instruction, episode 3
- No, really, you need to pass all unhandled messages to DefWindowProc, part 2
- When working with Win32 FILETIME , don’t forget that you have std::chrono now
- A brief history of Windows scroll bar shortcuts
- What’s the highest legal FILETIME ? Is it safe to use?
- Comparing exception behavior of magic statics, std:: call_ once , and std:: async
- std::call_once vs. std::async
- Magic statics vs. std::call_once
- Why do Microsoft job levels start in the high 50’s instead of starting at a sane number like 1?
- Why didn’t ReadDirectoryChangesW provide a way to correlate the two sides of a rename operation?
- How can I remove the Close button from my window caption?
- Why is the x86 undefined instruction called ud2 ? Why 2?
- What algorithm did Windows XP use to choose your initial user picture?
- A sample use of the winstart.bat file in Windows 95
- Why don’t we allow stacks to be sparse, instead of forcing them to be contiguous?
- What happens if you change a window class’s GCL_ CBWNDEXTRA ?
- The case of the progress callback that never got called when progress happened
- The perils of binding to value types in XAML
- Microspeak: Funded / unfunded
August 2026
- AWE does not require PAE, though PAE makes it much more useful
- On forcing all derived classes to implement a specific non-virtual method, part 2
- On forcing all derived classes to implement a specific non-virtual method, part 1
- In the product end game, every change carries significant risk, episode 2
- Why didn’t the Windows Entertainment Pack just run the MS-DOS version inside an emulator?
- Comparing the two holograms on the Windows 95 box
- Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam
- Reducing C++ template bloat by factoring out the type-dependent portions of the function
- On wrapping a callable in a lambda that just calls it with the same parameters
- Why did the Microsoft Entertainment Pack for Windows have a special sticker announcing that it also had Tetris?
- How do functions like alloca allocate memory from the stack?
- Forcing an ARM64X executable to run as a specific architecture
- A little helper class for managing LPPROC_ THREAD_ ATTRIBUTE_ LIST s
- The comments that go into code versus those that go into the pull request description
- The little-known winstart.bat batch file
- How can I perform a CopyFile in unbuffered mode?
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 5
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 4
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 3
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 2
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 1
July 2026
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 10
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 9
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 8
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 7
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 6
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 5
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 4
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 3
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 2
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 1
- Why has the display control panel pointer truncation bug gone unfixed for so long?
- Speculating on how the buggy control panel extension truncated a value that it had right in front of it
- The case of the invalid function pointer when shutting down the display control panel
- Microspeak: Double-click and drill down
- Why don’t we just make the entire stack out of guard pages?
- The case of the mysterious changes to integers when there shouldn’t have been any code generation effect
- I’ve decoded a #pragma detect_mismatch error and fixed the mismatch, but I still get the error
- The other kind of control flow guard check: The combined validate and call
- How did Windows 95 decide that a setup program ran?
- I opened a file with FILE_ FLAG_ DELETE_ ON_ CLOSE , but now I changed my mind
- How did we conclude that CcNamespace.dll was the ringleader of a group of DLLs that unloaded prematurely?
- The case of the thread executing from an unloaded third-party DLL
- It rather involved being on the other side of this airtight hatchway: Changing administrative settings
June 2026
- 2026 mid-year link clearance
- A compatibility note on the abuse of Windows window class extra bytes
- The evolution of window and class extra bytes in Windows
- The case of the DLL that was not present in memory despite not being formally unloaded, part 2
- Raymond’s hot take on Hainanese chicken
- The case of the DLL that was not present in memory despite not being formally unloaded, part 1
- Cancellation of Windows Runtime activities is asynchronous
- Microspeak elaborated: Isn’t escrow just a release candidate by another name?
- In memory of the man who put red and green squiggles under words
- What does it mean when the bottom bit of my HMODULE is set?
- Why doesn’t GetLastInputInfo() return info for the user I’m impersonating?
- Windows stack limit checking retrospective, follow-up
- Retrofitting the WM_ COPYDATA message onto Windows 3.1
- The time the x86 emulator team found code so bad that they fixed it during emulation
- How can I schedule work on a thread pool with low latency?
- Understanding the rationale behind a rule when trying to circumvent it
- What’s the opposite of ClipCursor that lets me exclude the cursor from a region?
- The Microsoft Company Party where everybody played name tag swap
- Rotation revisited: Shuffling more than three blocks, and other small notes
- The back cover of C++: The Programming Language also raises questions not answered by the front cover
- Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition
- Rotation revisited: Cycle decomposition in clang’s libcxx
- Rotation revisited: A shocking discovery about gcc’s unidirectional rotation algorithm
- Rotation revisited: Another unidirectional algorithm
- The placeholder name for the Windows 8 experience was “modern”
May 2026
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 3
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 2
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 1
- If C# and JavaScript lets me await a Windows Runtime asynchronous operation more than once, why not C++/WinRT?
- A hypothetical redesign of System. Diagnostics. Process to avoid confusion over properties that are valid only when you are the one who called Start
- Why do you say that a COM STA thread must pump messages if I see sample code creating STA threads and not pumping messages?
- How do I use Win32 structures from the Windows Runtime?
- The classic TreeView control lets me sort by name or by lParam, but why not both?
- What is the history of the ERROR_ ARENA_ TRASHED error code?
- Just shows that nobody cares about debugging the parity flag any more
- The case of the CreateFileMapping that always reported ERROR_ ALREADY_ EXISTS
- A constant-space linear-time algorithm for deleting all but the 10 most recent files in a directory
- The case of the hang when the user changed keyboard layouts
- Why do Windows client editions on 32-bit x86 systems artificially limit RAM to 4 GB?
- Additional notes on controlling which handles are inherited by CreateProcess
- Developing more confidence when tracking renames via ReadDirectoryChangesW
- When you upgrade your resource strings to Unicode, don’t forget to specify the L prefix
- Why not have changes in API behavior depend on the SDK you link against?
- A dispute over the TAB key highlights a mismatch between Microsoft and IBM organizational structures
- How do I inform Windows that I’m writing a binary file?
- Developing a cross-process reader/writer lock with limited readers, part 4: Abandonment
April 2026
- Developing a cross-process reader/writer lock with limited readers, part 3: Fairness
- Developing a cross-process reader/writer lock with limited readers, part 2: Taking turns when being grabby
- Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore
- Looking at consequences of passing too few register parameters to a C function on various architectures
- Defending against exceptions in a scope_exit RAII type
- Another crash caused by uninstaller code injection into Explorer
- Mapping the page tables into memory via the page tables
- Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?
- How did code handle 24-bit-per-pixel formats when using video cards with bank-switched memory?
- Forgotten message from the past: LB_ INITSTORAGE
- What’s up with window message 0x0091 ? We’re getting it with unexpected parameters
- Why is there a long delay between a thread exiting and the WaitForSingleObject returning?
- Why was there a red telephone at every receptionist desk?
- Finding a duplicated item in an array of N integers in the range 1 to N − 1
- How do you add or remove a handle from an active WaitForMultipleObjects ?, part 2
- How do you add or remove a handle from an active WaitForMultipleObjects ?
- How do you add or remove a handle from an active MsgWaitForMultipleObjects ?
Every year
2026 2222025 2732024 2672023 2682022 2682021 2732020 2672019 2922018 2952017 2852016 2762015 2762014 3042013 3482012 3072011 3102010 3602009 4202008 4312007 4592006 4302005 4002004 4502003 189