The Curious Engineer

All blogs / Windows internals

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

  1. The support case of a customer who said that all they could see was a black screen
  2. C++/WinRT overcorrection: Using make_self and immediately converting it to the projected interface
  3. Why don’t we run the taskbar and Task Manager at high priority, so they can remain responsive?
  4. Puzzling out why a program doesn’t work when run from a batch file, but works when double-clicked from Explorer
  5. Why didn’t we use the COM static store to clean up the unmarshalable delegate?
  6. Why didn’t we use Co­Register­Initialize­Spy to clean up the unmarshalable delegate?
  7. Why didn’t we use Ro­Register­For­Apartment­Shutdown to clean up the unmarshalable delegate?
  8. Microspeak: Drain the slide, back-up slides
  9. Why do we need ud2 when int 6 is right there?
  10. C++ futures part 5: std:: future and std:: shared_future
  11. C++ futures part 4: What if I want an immediate on-thread std::async ?
  12. C++ futures part 3: The mental model for std::async
  13. C++ futures part 2: The mental model for std::promise , std::packaged_task
  14. C++ futures part 1: The mental model
  15. One way of thinking about access specifiers in C++/WinRT implementation types
  16. If one anti-malware software is good, does that make two better?
  17. How can undefined opcodes ud0 and ud1 have parameters? How undefined were they?
  18. Why does the compiler sometimes use ud2 and sometimes int 3 for code that shouldn’t execute?
  19. If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts?
  20. Why is there no Windows hot-patching support for other architectures like 32-bit ARM and MIPS?
  21. Windows on Itanium also provided for hot-patching, in an even simpler way

September 2026

  1. Windows on AArch64 also provides for hot-patching, but it’s much simpler than on x86
  2. As a general rule, calling product support while drunk is not recommended
  3. C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times
  4. Debugging walkthrough: Access violation on nonsense instruction, episode 3
  5. No, really, you need to pass all unhandled messages to DefWindowProc, part 2
  6. When working with Win32 FILETIME , don’t forget that you have std::chrono now
  7. A brief history of Windows scroll bar shortcuts
  8. What’s the highest legal FILETIME ? Is it safe to use?
  9. Comparing exception behavior of magic statics, std:: call_ once , and std:: async
  10. std::call_once vs. std::async
  11. Magic statics vs. std::call_once
  12. Why do Microsoft job levels start in the high 50’s instead of starting at a sane number like 1?
  13. Why didn’t Read­Directory­ChangesW provide a way to correlate the two sides of a rename operation?
  14. How can I remove the Close button from my window caption?
  15. Why is the x86 undefined instruction called ud2 ? Why 2?
  16. What algorithm did Windows XP use to choose your initial user picture?
  17. A sample use of the winstart.bat file in Windows 95
  18. Why don’t we allow stacks to be sparse, instead of forcing them to be contiguous?
  19. What happens if you change a window class’s GCL_ CB­WND­EXTRA ?
  20. The case of the progress callback that never got called when progress happened
  21. The perils of binding to value types in XAML
  22. Microspeak: Funded / unfunded

August 2026

  1. AWE does not require PAE, though PAE makes it much more useful
  2. On forcing all derived classes to implement a specific non-virtual method, part 2
  3. On forcing all derived classes to implement a specific non-virtual method, part 1
  4. In the product end game, every change carries significant risk, episode 2
  5. Why didn’t the Windows Entertainment Pack just run the MS-DOS version inside an emulator?
  6. Comparing the two holograms on the Windows 95 box
  7. Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam
  8. Reducing C++ template bloat by factoring out the type-dependent portions of the function
  9. On wrapping a callable in a lambda that just calls it with the same parameters
  10. Why did the Microsoft Entertainment Pack for Windows have a special sticker announcing that it also had Tetris?
  11. How do functions like alloca allocate memory from the stack?
  12. Forcing an ARM64X executable to run as a specific architecture
  13. A little helper class for managing LPPROC_ THREAD_ ATTRIBUTE_ LIST s
  14. The comments that go into code versus those that go into the pull request description
  15. The little-known winstart.bat batch file
  16. How can I perform a Copy­File in unbuffered mode?
  17. Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 5
  18. Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 4
  19. Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 3
  20. Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 2
  21. Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 1

July 2026

  1. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 10
  2. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 9
  3. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 8
  4. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 7
  5. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 6
  6. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 5
  7. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 4
  8. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 3
  9. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 2
  10. Making an agile version of a Windows Runtime delegate in C++/WinRT, part 1
  11. Why has the display control panel pointer truncation bug gone unfixed for so long?
  12. Speculating on how the buggy control panel extension truncated a value that it had right in front of it
  13. The case of the invalid function pointer when shutting down the display control panel
  14. Microspeak: Double-click and drill down
  15. Why don’t we just make the entire stack out of guard pages?
  16. The case of the mysterious changes to integers when there shouldn’t have been any code generation effect
  17. I’ve decoded a #pragma detect_mismatch error and fixed the mismatch, but I still get the error
  18. The other kind of control flow guard check: The combined validate and call
  19. How did Windows 95 decide that a setup program ran?
  20. I opened a file with FILE_ FLAG_ DELETE_ ON_ CLOSE , but now I changed my mind
  21. How did we conclude that CcNamespace.dll was the ringleader of a group of DLLs that unloaded prematurely?
  22. The case of the thread executing from an unloaded third-party DLL
  23. It rather involved being on the other side of this airtight hatchway: Changing administrative settings

June 2026

  1. 2026 mid-year link clearance
  2. A compatibility note on the abuse of Windows window class extra bytes
  3. The evolution of window and class extra bytes in Windows
  4. The case of the DLL that was not present in memory despite not being formally unloaded, part 2
  5. Raymond’s hot take on Hainanese chicken
  6. The case of the DLL that was not present in memory despite not being formally unloaded, part 1
  7. Cancellation of Windows Runtime activities is asynchronous
  8. Microspeak elaborated: Isn’t escrow just a release candidate by another name?
  9. In memory of the man who put red and green squiggles under words
  10. What does it mean when the bottom bit of my HMODULE is set?
  11. Why doesn’t Get­Last­Input­Info() return info for the user I’m impersonating?
  12. Windows stack limit checking retrospective, follow-up
  13. Retrofitting the WM_ COPY­DATA message onto Windows 3.1
  14. The time the x86 emulator team found code so bad that they fixed it during emulation
  15. How can I schedule work on a thread pool with low latency?
  16. Understanding the rationale behind a rule when trying to circumvent it
  17. What’s the opposite of Clip­Cursor that lets me exclude the cursor from a region?
  18. The Microsoft Company Party where everybody played name tag swap
  19. Rotation revisited: Shuffling more than three blocks, and other small notes
  20. The back cover of C++: The Programming Language also raises questions not answered by the front cover
  21. Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition
  22. Rotation revisited: Cycle decomposition in clang’s libcxx
  23. Rotation revisited: A shocking discovery about gcc’s unidirectional rotation algorithm
  24. Rotation revisited: Another unidirectional algorithm
  25. The placeholder name for the Windows 8 experience was “modern”

May 2026

  1. Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 3
  2. Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 2
  3. Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 1
  4. If C# and JavaScript lets me await a Windows Runtime asynchronous operation more than once, why not C++/WinRT?
  5. A hypothetical redesign of System. Diagnostics. Process to avoid confusion over properties that are valid only when you are the one who called Start
  6. Why do you say that a COM STA thread must pump messages if I see sample code creating STA threads and not pumping messages?
  7. How do I use Win32 structures from the Windows Runtime?
  8. The classic TreeView control lets me sort by name or by lParam, but why not both?
  9. What is the history of the ERROR_ ARENA_ TRASHED error code?
  10. Just shows that nobody cares about debugging the parity flag any more
  11. The case of the Create­File­Mapping that always reported ERROR_ ALREADY_ EXISTS
  12. A constant-space linear-time algorithm for deleting all but the 10 most recent files in a directory
  13. The case of the hang when the user changed keyboard layouts
  14. Why do Windows client editions on 32-bit x86 systems artificially limit RAM to 4 GB?
  15. Additional notes on controlling which handles are inherited by Create­Process
  16. Developing more confidence when tracking renames via Read­Directory­ChangesW
  17. When you upgrade your resource strings to Unicode, don’t forget to specify the L prefix
  18. Why not have changes in API behavior depend on the SDK you link against?
  19. A dispute over the TAB key highlights a mismatch between Microsoft and IBM organizational structures
  20. How do I inform Windows that I’m writing a binary file?
  21. Developing a cross-process reader/writer lock with limited readers, part 4: Abandonment

April 2026

  1. Developing a cross-process reader/writer lock with limited readers, part 3: Fairness
  2. Developing a cross-process reader/writer lock with limited readers, part 2: Taking turns when being grabby
  3. Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore
  4. Looking at consequences of passing too few register parameters to a C function on various architectures
  5. Defending against exceptions in a scope_exit RAII type
  6. Another crash caused by uninstaller code injection into Explorer
  7. Mapping the page tables into memory via the page tables
  8. Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?
  9. How did code handle 24-bit-per-pixel formats when using video cards with bank-switched memory?
  10. Forgotten message from the past: LB_ INIT­STORAGE
  11. What’s up with window message 0x0091 ? We’re getting it with unexpected parameters
  12. Why is there a long delay between a thread exiting and the Wait­For­Single­Object returning?
  13. Why was there a red telephone at every receptionist desk?
  14. Finding a duplicated item in an array of N integers in the range 1 to N − 1
  15. How do you add or remove a handle from an active Wait­For­Multiple­Objects ?, part 2
  16. How do you add or remove a handle from an active Wait­For­Multiple­Objects ?
  17. How do you add or remove a handle from an active Msg­Wait­For­Multiple­Objects ?

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