The Curious Engineer

The Old New Thing

2022–2026

1,298 posts

← 2017–2021

2026 222

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 ?
  18. Were there any Windows 3.1 programs that were so incompatible with Windows 95 that there was no point trying to patch them?
  19. Learning to read C++ compiler errors: Illegal use of -> when there is no -> in sight
  20. How can I use Read­Directory­ChangesW to know when someone is copying a file out of the directory?
  21. Why doesn’t the system let you declare your own messages to have the same semantics as WM_ COPY­DATA ?
  22. The cover of C++: The Programming Language raises questions not answered by the cover

March 2026

  1. Before you check if an update caused your problem, check that it wasn’t a problem before the update
  2. A question about the maximimum number of values in a registry key raises questions about the question
  3. What if a dialog wants to intercept its own message loop?
  4. Why doesn’t WM_ ENTER­IDLE work if the dialog box is a Message­Box ?
  5. How can I change a dialog box’s message loop to do a Msg­Wait­For­Multiple­Objects instead of Get­Message ?
  6. Windows 95 defenses against installers that overwrite a file with an older version
  7. How can I make sure the anti-malware software doesn’t terminate my custom service?
  8. Windows stack limit checking retrospective: arm64, also known as AArch64
  9. Windows stack limit checking retrospective: amd64, also known as x86-64
  10. Windows stack limit checking retrospective: Alpha AXP
  11. Windows stack limit checking retrospective: x86-32 also known as i386, second try
  12. Windows stack limit checking retrospective: PowerPC
  13. Windows stack limit checking retrospective: MIPS
  14. Windows stack limit checking retrospective: x86-32, also known as i386
  15. How do compilers ensure that large stack allocations do not skip over the guard page?
  16. A snappy answer when asked about dressing casually at IBM
  17. The fine print giveth and the bold print taketh away: The countdown timer
  18. Learning to read C++ compiler errors: Ambiguous overloaded operator
  19. When Read­Directory­ChangesW reports that a deletion occurred, how can I learn more about the deleted thing?
  20. The mystery of the posted message that was dispatched before reaching the main message loop
  21. Aha, I found a counterexample to the documentation that says that Query­Performance­Counter never fails
  22. Just for fun: A survey of write protect notches on floppy disks and other media
  23. What sort of horrible things happen if my dialog has a non-button with the control ID of IDCANCEL ?

February 2026

  1. Intercepting messages inside Is­Dialog­Message , fine-tuning the message filter
  2. Intercepting messages inside Is­Dialog­Message , installing the message filter
  3. Intercepting messages before Is­Dialog­Message can process them
  4. Customizing the ways the dialog manager dismisses itself: Isolating the Close pathway
  5. Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, second (failed) attempt
  6. The 2026/2027 Seattle Symphony subscription season at a glance
  7. Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, first (failed) attempt
  8. Exploring the signals the dialog manager uses for dismissing a dialog
  9. Could Write­Process­Memory be made faster by avoiding the intermediate buffer?
  10. Microspeak: Escrow
  11. It rather involved being on the other side of the airtight hatchway: Tricking(?) a program into reading files
  12. How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_ CHAR message?
  13. How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_ KEY­DOWN message?
  14. How do I suppress the hover effects when I put a Win32 common controls ListView in single-click mode?
  15. How did Windows 95 get permission to put the Weezer video Buddy Holly on the CD?
  16. What should I do if a wait call reports WAIT_ ABANDONED ?
  17. How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?, part 2
  18. How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?
  19. Super Bowl LX creates an opportunity for symphonic friendly wagering
  20. How can I prevent the user from changing the widths of ListView columns?
  21. Some small stories about the giant satellite dish antenna that was behind Microsoft Building 11
  22. Studying compiler error messages closely: Input file paths

January 2026

  1. Why not store the SAFEARRAY reference count as a hidden allocation next to the SAFEARRAY ?
  2. How can I retain access to the data in a SAFEARRAY after my method returns?
  3. Why did I lose the data even though I called Safe­Array­Add­Ref ?
  4. A digression on the design and implementation of Safe­Array­Add­Ref and extending APIs in general
  5. What’s the difference between Safe­Array­Access­Data and Safe­Array­Add­Ref ?
  6. C++ has scope_exit for running code at scope exit. C# says “We have scope_exit at home.”
  7. A simple helper function for attaching a progress handler to a Windows Runtime IAsync­Action­With­Progress or IAsync­Operation­With­Progress
  8. On the proper usage of a custom Win32 dialog class
  9. Microspeak: On fire, putting out fires
  10. What was the secret sauce that allows for a faster restart of Windows 95 if you hold the shift key?
  11. How can I get the tab index number from a dialog box control?
  12. When programs assume that the system will never change, episode 4: Stealing strings
  13. Clipping the focus item when looking for its on-screen location, part 3
  14. Clipping the focus item when looking for its on-screen location, part 2
  15. Clipping the focus item when looking for its on-screen location
  16. Using Active Accessibility to find out where the focus item is
  17. Using Active Accessibility to find out where the Windows caret is
  18. How can I find out where the Windows caret is?
  19. Swapping two blocks of memory that reside inside a larger block, in constant memory, refinement
  20. How can you swap two non-adjacent blocks of memory using only forward iterators?
  21. How can you swap two adjacent blocks of memory using only forward iterators?
  22. Swapping two blocks of memory that reside inside a larger block, in constant memory

2025 273

December 2025

  1. 2025 year-end link clearance
  2. Understanding and mitigating a stack overflow in our task sequencer
  3. Additional notes on color-keyed overlays as a way of doing smooth video rendering
  4. The Gävle Goat (Gävlebocken) succumbs in 2025 to a new menace
  5. How can I detect that the system is running low on memory? Or that my job is running low on memory?
  6. Why are we worried about memory access semantics? Full barriers should be enough for anybody
  7. Reading the fine print, episode 4: Holiday promotions
  8. Why is the last letter of my string not making it to the clipboard?
  9. Why does my Ctrl + M accelerator key activate when I press the Enter key?
  10. When irate product support customers demand to speak to Bill Gates
  11. All the other cool languages have try … finally . C++ says “We have try … finally at home.”
  12. A shortcut gives me a weird path for a program shortcut that doesn’t point to the executable, so what is it?
  13. Concluding thoughts on our deep dive into Windows clipboard text conversion
  14. Deducing the consequences of Windows clipboard text formats on UTF-8
  15. Why is the Windows clipboard taking the scenic route when converting from CF_ TEXT to CF_ OEM­TEXT ?
  16. Misunderstanding what the Cricket Celebration Bowl is
  17. The Windows clipboard automatic text conversion algorithm is path-dependent
  18. Resolving an ambiguity in the Windows clipboard automated text conversion table
  19. Studying the various locale mismatch scenarios in Windows clipboard text format synthesis
  20. How does Windows synthesize the CF_ LOCALE clipboard format?
  21. How does Windows synthesize CF_ UNICODE­TEXT from CF_ TEXT and vice versa?
  22. How does Windows synthesize CF_ OEM­TEXT from CF_ TEXT and vice versa?
  23. How can my process read its own standard output?
  24. How can I read the standard output of an already-running process?
  25. How do I check whether the user has permission to create files in a directory?
  26. Microspeak: Big rocks
  27. How do I get my edit control text to be autoselected when I choose it to be the default focus in my dialog?

November 2025

  1. How can I have a Win32 drop-down combo box with a read-only edit control?
  2. Message-only windows are for messaging, not as a convenient victim for hosting UI
  3. At what point in the Windows development cycle is it too late to change the text of a translatable string?
  4. The apocryphal origins of the Hot Dog Stand color scheme
  5. Why does XAML break down when I have an element that is half a billion pixels tall?
  6. Maybe somebody can explain to me how weak references solve the ODR problem
  7. In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?
  8. Is Write­Process­Memory faster than shared memory for transferring data between two processes?
  9. Microspeak: Little-r
  10. How can I detect that Windows is running in S-Mode, redux
  11. I can use WM_ COPY DATA to send a block of data to another window, but how does it send data back?
  12. Could we use CTAD to simplify the use of WRL’s Callback function?
  13. Non-recursively deleting a binary tree in constant space: Rotating the tree
  14. Behind the scenes on how Windows 95 application compatibility patched broken programs
  15. How did Windows 3.1 distinguish two different programs that happened to share the same executable name?
  16. Non-recursively deleting a binary tree in constant space: Restructuring the tree
  17. Non-recursively deleting a binary tree in constant space: Synthesizing the parent pointer
  18. Non-recursively deleting a binary tree in constant space: Traversal with parent pointers
  19. The Microsoft SoftCard for the Apple II: Getting two processors to share the same memory
  20. Why does SHFormat­Date­Time take an unaligned FILETIME ?

October 2025

  1. Microspeak: turn into a pumpkin
  2. Trying to build a XAML tree in code throws a “No installed components were detected” exception
  3. What to do when you have a crash in the runtime control flow guard check
  4. How did the Windows 95 user interface code get brought to the Windows NT code base?
  5. Dubious security vulnerability: Denial of service by loading a very large file
  6. The early history of the Windows Runtime PropertyValue and why there is a PropertyType.Inspectable that is never used
  7. Windows Runtime design principle: Properties can be set in any order
  8. What makes cheap_ steady_ clock faster than std:: chrono:: high_ resolution_ clock ?
  9. Microspeak: The hockey stick on wheels
  10. What about the icons in pifmgr.dll?
  11. Using RAII to remedy a defect where not all code paths performed required exit actions, follow-up
  12. Using RAII to remedy a defect where not all code paths performed required exit actions
  13. Why can you increment a reference count with relaxed semantics, but you have to decrement with release semantics?
  14. 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?
  15. API design principle: Don’t tempt people to divide by zero
  16. The self-assignment principle for Windows Runtime properties: Don’t change behavior based on whether a property has been written to
  17. The self-assignment principle for Windows Runtime properties applies to default values
  18. Windows Runtime API design principles around read-write properties: Idempotence and self-assignment
  19. Remembering the end of support for VRML in Internet Explorer
  20. Code comments should apply to the state of the system at the point the comment “executes”
  21. Can we get weak functions for static linking? The Visual C++ compiler says “We have weak functions at home”
  22. The problem with inferring from a function call operator is that there may be more than one
  23. How do I convert a FILETIME to a C++ clock like std::system_clock or winrt::clock ?

September 2025

  1. Microspeak: Convicted
  2. How can I enumerate the overflow icons in the Notification Area without showing them?
  3. Why didn’t Windows 95 setup install a miniature Windows 95 so that it could be written as a 32-bit program?
  4. Samples note: Use comments to describe what code does, not what you wish the code would do
  5. Why is Windows still tinkering with critical sections?
  6. Another lesson learned from the Windows 98 on-stage USB blue screen
  7. Why was Windows 3.0’s WinHelp called an online help system when it ran offline?
  8. Learning to read C++ compiler errors: Not a legal base class
  9. Can I close a duplicate handle while I’m waiting on the original?
  10. How can I get my shell thumbnail extractors to run in the same process?
  11. Translating the STATUS_ STACK_ BUFFER_ OVERRUN status code into customer-ready text
  12. Why is the name of the Microsoft Wireless Notebook Presenter Mouse 8000 hard-coded into the Bluetooth drivers?
  13. How can I convert a third party in-process server so it runs in the COM surrogate?
  14. Why can’t std::apply figure out which overload I intend to use? Only one of then will work!
  15. The documentation says that CompanyName version information is required, but my program seems to work without it, so how required is it?
  16. A suggestion to people who assign nicknames to meeting rooms
  17. Why didn’t Windows 95 simply special-case the laptops that locked up when it executed the HLT instruction?
  18. The case of the crash on a null pointer even though we checked it for null
  19. How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 2
  20. How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 1
  21. Dubious security vulnerability: Remembering passwords for recently-opened ZIP files
  22. Thoughts on creating a tracking pointer class, part 16: Second attempt to use a list

August 2025

  1. Thoughts on creating a tracking pointer class, part 15: A custom shared pointer
  2. Thoughts on creating a tracking pointer class, part 14: Nonthrowing moves with the shared tracking pointer
  3. Thoughts on creating a tracking pointer class, part 13: Restoring the strong exception guarantee
  4. Thoughts on creating a tracking pointer class, part 12: A shared tracking pointer
  5. Thoughts on creating a tracking pointer class, part 11: Repairing assignment
  6. Thoughts on creating a tracking pointer class, part 10: Proper conversion
  7. Thoughts on creating a tracking pointer class, part 9: Conversion
  8. Thoughts on creating a tracking pointer class, part 8: Tracking const objects
  9. Thoughts on creating a tracking pointer class, part 7: Non-modifying trackers, second try
  10. Thoughts on creating a tracking pointer class, part 6: Non-modifying trackers
  11. Thoughts on creating a tracking pointer class, part 5: Copying our tracking pointer
  12. Thoughts on creating a tracking pointer class, part 4: Using a circular doubly linked list
  13. Thoughts on creating a tracking pointer class, part 3: Using a std::vector
  14. Thoughts on creating a tracking pointer class, part 2: Using a std::list
  15. Thoughts on creating a tracking pointer class, part 1: Concept art
  16. Under what conditions could a Read­File or Write­File fail to transfer all of the bytes, and how do I detect that?
  17. How can I detect that Windows is running in S-Mode?
  18. How do I disable pieces of the property sheet for a service in the Services MMC snap-in?
  19. Why are Windows semiannual updates named H1 and H2?
  20. How can I read more than 4GB of data from a file in a single call to Read­File ?
  21. Two related questions about keeping track of PIDs of IPC clients

July 2025

  1. A consequence of the weird wReserved value at the start of the DECIMAL structure
  2. In C++/WinRT, how can I await multiple coroutines and capture the results?, part 0
  3. Why is there a window with no name blocking Windows shutdown?
  4. API design note: Don’t make up multiple names for the same thing
  5. How can I confirm in the Windows debugger that I’m looking at a COMDAT-folded function?
  6. How can I wait until a named object (say a mutex) is created?
  7. Exploring possible solutions to the inconsistency in how Windows searches case-insensitively for named resources
  8. Being more adamant about reporting that C++/WinRT was unable to resume execution on a dispatcher thread
  9. What happens if C++/WinRT is unable to resume execution on a dispatcher thread?
  10. The case of the invalid instruction exception on an instruction that should never have executed
  11. If the Window Runtime PropertyValue is for boxing non-inspectables, why is there a PropertyValue.CreateInspectable?
  12. The Fundamental Failure-Mode Theorem: Systems lie about their proper functioning
  13. Perhaps not a recommended usage for an emergency power outlet
  14. There is a std:: chrono:: high_ resolution_ clock , but no low_ resolution_ clock
  15. Detecting and reporting all unhandled C++ exceptions as well as all unhandled structured exceptions
  16. Our first attempt to detect and report all unhandled C++ exceptions as well as all unhandled structured exceptions
  17. When I install an unhandled structured exception filter, why doesn’t std:: terminate get called?
  18. A walkthrough of the original Microsoft Building 3
  19. Dubious security vulnerability: If I perform this complex series of manual steps, I can crash a program I am running
  20. Why doesn’t LVIF_ INDENT work without an image list?
  21. German language cheat sheet: On changing quantities
  22. If the Format­Message function fails, and I requested that it allocate a buffer, do I have to free the buffer?
  23. Unintended yet somehow entirely expected consequences of marking a COM interface as local
  24. The sizzle reel that says things that nobody understands

June 2025

  1. 2025 mid-year link clearance
  2. Embracing the power of the empty set in API design: Requesting zero items
  3. Why do I get errors or warnings about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 3
  4. Why do I get errors about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 2
  5. Your information has been permanently deleted, for small values of permanently
  6. Why do I get errors about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 1
  7. Abusing copyright strings to trick software into thinking it’s running on your competitor’s PC
  8. The MIDL compiler still has trouble with double greater-than signs, sadly
  9. The case of the invalid handle error when a handle is closed while a thread is waiting on it
  10. Learning to read C++ compiler errors: Ambiguous symbol errors after including a header file
  11. You have to tell Get- and Set­Security­Info the object type, you can’t make it guess
  12. Funding the Egghead store shopping spree took a little extra legwork
  13. Writing a helper class for generating a particular category of C callback wrappers around C++ methods
  14. Thread pool threads are like preschool: Leave things the way you found them
  15. Why does Windows even have Interlocked functions when we have std::atomic ?
  16. Removing the MAX_PATH restriction on paths applies only to paths
  17. Application compatibility for Windows 95 crashed a cash register
  18. Dubious security vulnerability: Tricking a program into running non-elevated
  19. Why does C++ think my class is copy-constructible when it can’t be copy-constructed?
  20. Why do some Windows functions fail if I pass an unaligned Unicode string?
  21. Riffing on a typo in the name of the opera Turandot
  22. How can I programmatically find the network path by which a folder has been shared?
  23. The symbolism of the magnifying glass is not universal
  24. Stating the obvious about debugging an invalid parameter error when freeing memory

May 2025

  1. Using an oracle to see where your code is producing the wrong output
  2. The case of creating new instances when you wanted to use the same one
  3. How do I convert a WIC bitmap back to a GDI HBITMAP ?
  4. What was origin of the code name Redpill for Windows 8 feature lockout?
  5. Why does Enum­Process­Modules report no modules on a process that was created suspended?
  6. How can I detect if one of my helper processes is launching child processes?
  7. How can I create a window the size of the screen without it being treated as a fullscreen window?
  8. Silly parlor tricks: Promoting a 32-bit value to a 64-bit value when you don’t care about garbage in the upper bits
  9. Why does Windows report my processor speed twice, with slightly different values?
  10. Secret passages on Microsoft main campus, episode 3
  11. What’s with the weird wReserved value at the start of the DECIMAL structure?
  12. How do I force RunOnce commands to run in a specific order?
  13. If I mark my thread pool callback as long-running, does it still count toward the thread pool thread limit?
  14. What is the developer set-up for developing Windows for multiple processor architectures?
  15. Dubious security vulnerability: A program does not run correctly if you run it the wrong way, redux
  16. How can I wait for Clipboard History to recognize a clipboard change before I change it again?
  17. Why doesn’t Clipboard History capture rapid changes to clipboard contents?
  18. What were the MS-DOS programs that the moricons.dll icons were intended for?
  19. What were the MS-DOS programs that Windows used the progman.exe stock icons for?
  20. What were the intended uses of those icons in moricons.dll ?
  21. Using type aliasing to avoid the ODR problem with conditional compilation, part 2
  22. Using C++ type aliasing to avoid the ODR problem with conditional compilation, part 1

April 2025

  1. Why does Windows have trouble finding my Win32 resource if it contains an accented character?
  2. Protecting Windows users from Janet Jackson’s Rhythm Nation
  3. Why did Windows 7, for a few months, log on slower if you have a solid color background?
  4. If we can have std::atomic<std::shared_ptr> , why not std::atomic<com_ptr> ?
  5. When I define a window class with no default cursor, what is the explanation for the cursors that appear in my client area?
  6. What resource ID should I give my application’s main icon?
  7. Microspeak: top of mind
  8. The ongoing story of seconds on the taskbar
  9. The case of the feature flag that didn’t stay on long enough, part 2
  10. The case of the feature flag that didn’t stay on long enough, part 1
  11. Using the classical model for linking to provide unit test overrides
  12. There was a lot of imagined dropping tablets in swimming pools
  13. Dubious security vulnerability: Once I have tricked the user into running a malicious shortcut, I can install malware
  14. The case of the UI thread that hung in a kernel call
  15. Function overloading is more flexible (and more convenient) than template function specialization
  16. Why can’t I use SEC_ LARGE_ PAGES with a file-based file mapping?
  17. The Goldilocks zone of software stability
  18. On priority inversion in the use of a spinlock to ensure atomic access to a shared_ptr
  19. Adding delays to our task sequencer, part 3
  20. Adding delays to our task sequencer, part 2
  21. Adding delays to our task sequencer, part 1
  22. The return of Building 7

March 2025

  1. If one program blocks shutdown, then all programs block shutdown, revisited
  2. The 2025/2026 Seattle Symphony subscription season at a glance
  3. Fixing exception safety in our task_ sequencer
  4. On launching a dialog when a specific combo box item is selected
  5. Why does INVALID_ HANDLE_ VALUE cast through a LONG_PTR first?
  6. We’ll fly you to Atlanta, Texas, and getting to your hotel in Atlanta, Georgia is your problem
  7. A note on the USB-to-PS/2 mouse adapter that came with Microsoft mouse devices
  8. On how different Windows ABIs choose how to pass 32-bit values in 64-bit registers
  9. The case of the critical section that let multiple threads enter a block of code
  10. What could cause a memory corruption bug to disappear in safe mode?
  11. You can’t simulate keyboard input with PostMessage, revisited
  12. Why didn’t Windows 95 setup use a miniature version of Windows 95 as its fallback GUI?
  13. Dubious security vulnerability: A program does not run correctly if you run it the wrong way
  14. The case of COM failing to pump messages in a single-threaded COM apartment
  15. Making sure that a DLL loads only from your application directory
  16. What are the thread safety requirements of HSTRING and BSTR ?
  17. What an insightful observation, you get to wear “the hat”
  18. How do I destroy an ABI pointer that I extracted from a C++/WinRT object?
  19. To some people, time zones are just a fancy way of sounding important, episode 2
  20. How can I choose a different C++ constructor at runtime?
  21. I tried to subscribe to a C++/WinRT event, but my callback was never called
  22. Microspeak: Respin
  23. Lexically scoped functions accessing parent locals: The display

February 2025

  1. C++/WinRT implementation inheritance: Notes on winrt::implements , part 8
  2. C++/WinRT implementation inheritance: Notes on winrt::implements , part 7
  3. C++/WinRT implementation inheritance: Notes on winrt::implements , part 6
  4. C++/WinRT implementation inheritance: Notes on winrt::implements , part 5
  5. C++/WinRT implementation inheritance: Notes on winrt::implements , part 4
  6. C++/WinRT implementation inheritance: Notes on winrt::implements , part 3
  7. C++/WinRT implementation inheritance: Notes on winrt::implements , part 2
  8. C++/WinRT implementation inheritance: Notes on winrt::implements , part 1
  9. Your statement is now available, just two hidden flyouts and five clicks away
  10. API design note: Beware of adding an “Other” enum value
  11. Investigating an argument-dependent lookup issue and working around it
  12. A sample implementation of the weak reference pattern for COM callbacks
  13. Async-Async revisited: What about cancellation?
  14. Did the Windows 95 setup team forget that MS-DOS can do graphics?
  15. How does Explorer find the “first” icon in a file
  16. Using alternate locales to get more interesting case mapping than the C
  17. The default C locale is not a very interesting one
  18. On exactly when XAML bindings are evaluated if an element is not yet loaded
  19. The original name for Flexible Single Master Operations in Active Directory
  20. On trying to log an exception as it leaves your scope

January 2025

  1. Creating a generic insertion iterator, part 2
  2. Creating a generic insertion iterator, part 1
  3. How do I create an inserter iterator that does unhinted insertion into an associative container like std::map ?
  4. My electric toothbrush was acting up, so I tried to reboot it
  5. A pattern for obtaining a single value while holding a lock
  6. A brief and incomplete comparison of memory corruption detection tools
  7. Memory corruption from outside the process looks like space aliens
  8. Be mindful of temporal terms in documents: What is the reference point in time?
  9. Why is there a bulge on my bicycle tire when I inflate it?
  10. Why doesn’t the Windows blue screen of death prominently identify the company that created the driver that crashed?
  11. Reminder: When a C++ object fails to construct, the destructor does not run
  12. The case of the crash when trying to erase an element from a std::set
  13. In a C++ class template specialization, how can I call the unspecialized version of a method?
  14. How does Get­User­Default­Geo­Name choose between ISO 3166-1 and UN M.49 codes?
  15. Microspeak: The walk-on topic
  16. A simplified overview of ways to add or update elements in a std::map
  17. Why does inadvertently passing a std::string instead of a char const* to a variadic function crash on x86-32 but not x86-64?
  18. Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 2
  19. Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 1
  20. Gesellschaft zur Stärkung der Verben: The German Society for the Irregularization of Verbs
  21. Emergency power resets on Lenovo, HP, Dell, and Acer laptops
  22. How can I tell whether a change to a control was due to the user or due to my program?
  23. Forcing an ERROR_ KEY_ DELETED error when trying to open HKEY_ CURRENT_ USER\ Software
  24. Could I be getting ERROR_ KEY_ DELETED for HKEY_ CURRENT_ USER\ Software when the user logs off?
  25. How is it possible to get ERROR_ KEY_ DELETED when I’m creating a key?

2024 267

December 2024

  1. 2024 year-end link clearance
  2. Making sure the Microsoft Visual C++ compiler chooses the right source encoding
  3. How various git diff viewers represent file encoding changes in pull requests
  4. In C++, failure to meet the requirements does not always mean that you fail if you don’t meet the requirements
  5. Why are Win32 resources strings bundled at all? And why bundles of 16?
  6. How can I check if two GUIDs are equal when they are provided as strings?
  7. A design flaw in the Windows 3D Pipes screen saver pointed out by a customer
  8. A common proposed solution to certain categories of IFNDR: Getting the linker to verify identical functions
  9. How do I register a file type for a scripting language so that users get a warning when they run an untrusted script?
  10. Inside STL: The atomic shared_ptr
  11. Is there a way to split the git history of a file or combine the histories of two files without a merge commit?
  12. Microspeak terms that didn’t take hold: airspace, synthetics, and AOI
  13. Why do we have header files <pshpackN.h> and <poppack.h> instead of just issuing the pragma directly?
  14. Converting to a derived class from the future: How to cast from a base class to an incomplete derived class?
  15. API naming principles for conditional operations: On, When, and If
  16. What is the CONTINUE_IF_FAILED equivalent of RETURN_IF_FAILED ?
  17. It rather involved being on the other side of this airtight hatchway: Disabling anti-malware scanning
  18. Learning to read C++ compiler errors: Failing to create a shared_ptr
  19. Learning to read C++ compiler errors: Nonsensical errors from a function declaration
  20. Won’t waiting for multiple threads one at a time introduce a severe performance issue?
  21. Why does my DLL reference count go up by one every time I create and exit a thread?
  22. Tricks from product support: We’re not smart enough to debug the problem, can you help us?
  23. News flash: Desire for loud cars correlates with psychopathy and sadism
  24. An analogy about register preservation rules in calling conventions

November 2024

  1. Assessing the attack complexity of a race condition security vulnerability
  2. Why does my program successfully take foreground only when running under the debugger?
  3. Checking whether a URI refers to a Web site root
  4. Microspeak: Real estate and Airspace
  5. How can I know when a window has processed a message that I posted to it?
  6. In C++, how can I make a default parameter be the this pointer of the caller?, revisited
  7. How can I detect which menu my item was invoked from?
  8. How do I determine whether Explorer is showing or hiding file extensions?
  9. A wrinkle in how Windows 95 setup bootstrapped its initial GUI step
  10. The operations for reading and writing single elements for C++ standard library maps
  11. How do I put a non-copyable, non-movable, non-constructible object into a std::optional ?
  12. Solving the puzzle of trying to put an object into a std::optional
  13. The puzzle of trying to put an object into a std::optional
  14. Why did Windows 95 setup use three operating systems?
  15. Debugger breakpoints are usually implemented by patching the in-memory copy of the code
  16. The case of a program that crashed on its first instruction
  17. Why do I observe reads from a memory-mapped file when writing large blocks?
  18. How do I declare an operator overload for my Windows Runtime class?
  19. What’s the difference between Display size and Screen size in the Windows 95 display control panel?
  20. On the limits of time travel in the face of undefined behavior in C
  21. On locale-aware substring matching, either case-sensitive or case-insensitive

October 2024

  1. What has case distinction but is neither uppercase nor lowercase?
  2. I have enabled “take ownership” permission, but I still cannot obtain write access
  3. Reverse-engineering what a “short” section is
  4. How useful is the hint passed to the std:: unordered_… collections?
  5. How can I explicitly specialize a templated C++ constructor, follow-up notes
  6. It rather involved being on the other side of the airtight hatchway: Defeating ASLR after you’ve gained RCE via ROP
  7. How do I create a Windows Runtime IRandom­Access­Stream around a bunch of bytes or a classic COM IStream ?
  8. Did Windows 95 shrink the default font size of windowed MS-DOS apps?
  9. Why does adding WS_ MINIMIZE­BOX change how my window behaves when the user presses Win + D ?
  10. Evaluating tail call elimination in the face of return address protection, part 2
  11. Evaluating tail call elimination in the face of return address protection, part 1
  12. Effects of classic return address tricks on hardware-assisted return address protection
  13. A quick introduction to return address protection technologies
  14. On naming things: The tension between naming something for what it is, what it does, or how it is used
  15. How can I explicitly specialize a templated C++ constructor?
  16. A correction to the awaitable lock for C++ PPL tasks
  17. If threads are created without a message queue, why can I post to them immediately upon creation?
  18. Microspeak: Run to ground
  19. A popular but wrong way to convert a string to uppercase or lowercase
  20. How does the linker decide whether to call WinMain or wWinMain ?
  21. How can I detect whether the user is running as an elevated administrator (as opposed to a natural administrator)?
  22. A function for creating an absolute security descriptor from a self-relative one
  23. Misunderstanding the “Prevent access to registry editing tools” policy

September 2024

  1. Pulling a single item from a C++ parameter pack by its index, remarks
  2. The case of the crash when destructing a std::map
  3. If you’re going to specify the LVS_SORTASCENDING or LVS_SORTDESCENDING style, you had better be telling the truth
  4. Another example of the Windows Runtime interop pattern: Using the UserConsentVerifier from a Win32 program
  5. The UserConsentVerifier confirms that the user is there, but it doesn’t protect any data
  6. Going beyond the empty set: Embracing the power of other empty things
  7. How can I check that all the changes in a git branch have been cherry-picked or rebased into its upstream branch?
  8. My window has the WS_ EX_ NOACTIVATE extended style, but it got activated anyway
  9. More on the mysterious [default_interface] attribute in Windows Runtime classes
  10. It rather involved being on the other side of this airtight hatchway: Posting completions to somebody else’s I/O completion port
  11. Some notes on Win32 carets
  12. The case of the fail-fast crashes coming from the power management system
  13. How can I tell whether two programs will share drive letter mappings?
  14. The case of the string being copied from a mysterious pointer to invalid memory, revisited
  15. Does the Resource Compiler have a separate preprocessor or doesn’t it?
  16. GitHub trick to find the commit that deleted a file
  17. The case of the image that came out horribly slanted: Negative stride
  18. The case of the image that came out horribly slanted: Taking the pitch into account
  19. The case of the image that came out horribly slanted: Diagnosis
  20. Why did Windows 95 use blue screen error messages instead of hard error messages?
  21. The Co­Initialize­Security function demands an absolute security descriptor

August 2024

  1. In the Windows kernel, what is a LUID, and what makes it loo-ey?
  2. How is the Windows.Foundation.Uri.Domain property different from Host?
  3. On the strange status of wchar_t in classic MIDL
  4. The Microsoft/IBM joint development was built on mutual respect, wait, is respect the right word?
  5. Thoughts on finding the essential elements of a set
  6. What if I need to wait for more than MAXIMUM_ WAIT_ OBJECTS threads?
  7. The role of the activation factory in the Windows Runtime
  8. What does ERROR_ KEY_ DELETED mean?
  9. Another tribute to Microsoft history hiding in Building 41
  10. Constructing nodes of a hand-made linked list, how hard can it be?
  11. The case of the missing ordinal 380
  12. Instead of putting a hash in the Portable Executable timestamp field, why not create a separate field for the hash?
  13. Temporarily dropping a lock: The anti-lock pattern
  14. A look back at one of the (many) projects code-named Highlander
  15. Embracing the power of the empty set in API design (and applying this principle to selectors and filters)
  16. What does it even mean to Close a Windows Runtime asynchronous operation or action?
  17. Why do I get E_ ACCESS­DENIED when trying to access my brokered Windows Runtime object?COM is double-checking the trust level.
  18. How do I know when the user has finished interacting with the Accounts­Settings­Pane ?
  19. It rather involved being on the other side of the airtight hatchway: Disabling a security feature as an administrator
  20. What are the dire consequences of registering a RunOnce command from my RunOnce command?
  21. The difference between undefined behavior and ill-formed C++ programs
  22. What’s the difference between Data­Package­View. Get­Uri­Async and Data­Package­View. Get­Web­Link­Async ?

July 2024

  1. How to compress out interior padding in a std::pair and why you don’t want to
  2. There is no mystery over who wrote the Blue Screen of Death, despite what some may want you to believe
  3. Why don’t Windows Imaging Component pixel format GUIDs continue their nice pattern?
  4. What can I do if IMlangConvertCharset is unable to convert from code page 28591 directly to UTF-8?
  5. In my Visual Studio project, I set my Conformance mode to permissive, but it’s still not permissive
  6. API naming principle: If there is no direct object, then the direct object is the source object
  7. Unquoted service paths: The new frontier in script kiddie security vulnerability reports
  8. Organizing the five creation dispositions of the Create­File function
  9. Creating an already-completed asynchronous activity in C++/WinRT, part 9
  10. Creating an already-completed asynchronous activity in C++/WinRT, part 8
  11. Creating an already-completed asynchronous activity in C++/WinRT, part 7
  12. Creating an already-completed asynchronous activity in C++/WinRT, part 6
  13. Creating an already-completed asynchronous activity in C++/WinRT, part 5
  14. Creating an already-completed asynchronous activity in C++/WinRT, part 4
  15. Creating an already-completed asynchronous activity in C++/WinRT, part 3
  16. Creating an already-completed asynchronous activity in C++/WinRT, part 2
  17. Creating an already-completed asynchonous activity in C++/WinRT, part 1
  18. What’s the point of std:: monostate ? You can’t do anything with it!
  19. How do I produce a Windows Runtime asynchronous activity from C++/WinRT?
  20. How do I produce a Windows Runtime asynchronous activity from C#?
  21. How do I produce a Windows Runtime asynchronous activity from C++/CX?
  22. The history of Alt +number sequences, and why Alt + 9731 sometimes gives you a heart and sometimes a snowman
  23. If I register the same shell extension as both a context menu extension and a drag/drop extension, how do I know which one the system is using?

June 2024

  1. 2024 mid-year link clearance
  2. Writing a remove_all_pointers type trait, part 2
  3. Writing a remove_all_pointers type trait, part 1
  4. Is there a built-in way in C++/WinRT to get the string name for a Windows Runtime enum?
  5. Microspeak: Fun fork
  6. Finding a specific value in a sequence of integers that changes by at most 1
  7. The Windows Runtime winrt:: hstring and the C++ std:: wstring are inter-assignable
  8. How to convert between different types of counted-string string types
  9. On the sadness of treating counted strings as null-terminated strings
  10. The time smart quotes prevented the entire Office division from committing code
  11. How can I view the list of symbols available in a library?
  12. Lock-free reference-counting a TLS slot using atomics, part 3
  13. Lock-free reference-counting a TLS slot using atomics, part 2
  14. Lock-free reference-counting a TLS slot using atomics, part 1
  15. The origin story of the Windows 3D Pipes screen saver
  16. How do I get the name of a SID, and what does it mean when the conversion fails?
  17. What’s the deal with std::type_identity ?
  18. Can INI files be Unicode? Yes, they can, but it has to be your idea
  19. How 16-bit Windows cached INI files for performance
  20. Why does Global­Lock max out at 255 locks?
  21. More on harmful overuse of std:: move

May 2024

  1. A graphical depiction of the steps in building a C++ executable, with XAML and packaging
  2. A graphical depiction of the steps in building a C++ executable, enhanced for classic Win32
  3. A graphical depiction of the steps in building a C++ executable, basics
  4. How can I force a DLL to register itself if it won’t respond to regsvr32 ?
  5. Is there any difference between String­From­IID and String­From­CLSID ?
  6. Setting the contents of a Windows Runtime Vector from C++/WinRT in one call
  7. Creating a prepopulated Windows Runtime Vector from C++/WinRT without going through an explicit std:: vector
  8. If you have to create a Windows Runtime Vector from C++/WinRT, do it as late as possible
  9. A blurry photo of the legendary USB Cart of Death
  10. If you know what interface you want, just pass it directly to CoCreateInstance
  11. Why can’t I find the injected name of a templated class’s templated base class?
  12. Pulling a single item from a C++ parameter pack by its index
  13. Building the most efficient device selector query that selects no devices
  14. The confidential coffee maker was not the only source of shenanigans at the IBM Boca office
  15. Before you try to change something, make sure you can change nothing
  16. An informal comparison of the three major implementations of std::string
  17. Asking for a DispatcherQueue from a GUI thread you created
  18. Awaiting a set of handles with a timeout, part 7: Just doing it one at a time
  19. Awaiting a set of handles with a timeout, part 6: Capturing the handles efficiently
  20. Awaiting a set of handles with a timeout, part 5: Generalizing the awaiter
  21. Awaiting a set of handles with a timeout, part 4: Building our own awaiter
  22. Awaiting a set of handles with a timeout, part 3: Going beyond two
  23. Awaiting a set of handles with a timeout, part 2: Continuing with two

April 2024

  1. Awaiting a set of handles with a timeout, part 1: Starting with two
  2. Awaiting a set of handles in C++/WinRT
  3. Adding state to the update notification pattern, part 8
  4. Adding state to the update notification pattern, part 7
  5. Adding state to the update notification pattern, part 6
  6. Adding state to the update notification pattern, part 5
  7. Adding state to the update notification pattern, part 4
  8. Adding state to the update notification pattern, part 3
  9. Adding state to the update notification pattern, part 2
  10. Adding state to the update notification pattern, part 1
  11. In search of the Ballmer Peak, and other results from SIGBOVIK 2024
  12. Dubious security vulnerability: Program allows its output to be exfiltrated
  13. What were the tax consequences of letting Windows 95 team members keep a piece of software as long as they tested it?
  14. The case of the string being copied from a mysterious pointer to invalid memory
  15. Why do STANDARD_ RIGHTS_ READ , STANDARD_ RIGHTS_ WRITE , and STANDARD_ RIGHTS_ EXECUTE have the same values?
  16. How can I find out which process has locked me out of the clipboard?
  17. If I enumerate all the processes and add up all the Get­Gui­Resources , why doesn’t it match the GR_ GLOBAL value?
  18. How does the classic Win32 ListView handle incremental searching?
  19. The case of the exception that a catch (…) didn’t catch
  20. It rather involved being on the other side of this airtight hatchway: System corruption caused by an administrator
  21. Windows debugger trick: Breaking when a specific debugger message is printed
  22. The history of computing, as told by the hallways of Microsoft Building 41
  23. Subroutine calls in the ancient world, before computers had stacks or heaps

March 2024

  1. How can I tell C++ that I want to discard a nodiscard value?
  2. I called Create­Environment­Block with a process’s token, but I didn’t get that process’s environment
  3. Some choices for encrypting data so that it can be decrypted only by the same user or computer
  4. Dubious security vulnerability: Manual operations can cause a program to hang
  5. Why isn’t C++ using my default parameter to deduce a template type?
  6. Why does my thread get a broken string as its initial parameter?
  7. Using the Display­Information class from a desktop Win32 application, part 2
  8. Using the Display­Information class from a desktop Win32 application, part 1
  9. How well does C++/WinRT com_ptr support class template argument deduction (CTAD)?
  10. How well does wil com_ptr support class template argument deduction (CTAD)?
  11. How well does WRL ComPtr support class template argument deduction (CTAD)?
  12. How well does ATL CComPtr support class template argument deduction (CTAD)?
  13. How well does MFC IPTR / CIP support class template argument deduction (CTAD)?
  14. How well does _com_ptr_t support class template argument deduction (CTAD)?
  15. Class template argument deduction (CTAD) and C++ COM wrappers: Initial explorations
  16. The 2024/2025 Seattle Symphony subscription season at a glance
  17. How can I force a copy of a C++ value?
  18. In C++/WinRT, you shouldn’t destroy an object while you’re co_await ing it
  19. How do I make an expression non-movable? What’s the opposite of std::move ?
  20. In domain\user syntax, you can often use the period as an abbreviation for “this computer”
  21. Is shadowing a member variable from a base class a bad thing? Maybe, but maybe not.
  22. C++/WinRT performance trap: Switching to Windows Runtime too soon

February 2024

  1. If a parameter isn’t used, what should I pass?
  2. On the whole idea of giving away a reference to yourself at destruction
  3. Mitigating attacks based on knowing the length of a Windows Hello PIN
  4. A C# LINQ one-liner to check if exactly one of a set of conditions is met
  5. Gotcha: Be careful how you shut down your dispatcher queues
  6. Gotcha: Don’t forget to shut down your dispatcher queues
  7. Once your object reaches final_release , you are committed to destructing it (eventually)
  8. Microspeak: Closing out, duping out
  9. Why can’t I trigger a manual blue screen crash by injecting the magic key sequence?
  10. If you’re just going to sit there doing nothing, at least do nothing correctly
  11. Registered command lines are just command lines, not a programming language
  12. Functions that return the size of a required buffer generally return upper bounds, not tight bounds
  13. It rather involved being on the other side of this airtight hatchway: Attacking a domain administrator from the local administrator
  14. How can I get the Windows Runtime HttpClient to display a basic authentication prompt?
  15. On the virtues of the trailing comma
  16. How do I suppress the error box that appears when a LoadLibrary fails?
  17. Why doesn’t my program get fancy drag/drop effects in high contrast mode with CLSID_ Drag­Drop­Helper ?
  18. On using milliseconds as a measure of network latency
  19. How can I close a thread pool and cancel all work that had been queued to it?
  20. The case of the invalid parameter error from Measure­Override
  21. Using virtual memory placeholders to allocate contiguous address space for multiple purposes

January 2024

  1. How can I add an environment variable to a process launched via Shell­Execute­Ex or IContext­Menu ?
  2. Smoothing over the differences (and defects) in the various implementations of IMemory­Buffer
  3. A comparison of various implementations of the Windows Runtime IMemory­Buffer
  4. How can I expose a pre-existing block of memory as a Windows Runtime object without copying the data?
  5. How can I give away a COM reference just before my object destructs?
  6. The dangerous implementations of the IMemory­Buffer­Reference.Closed event
  7. The useless IMemory­Buffer­Reference.Closed event
  8. Accessing a block of memory represented by a Windows Runtime IMemoryBuffer
  9. The case of the fail-fast trying to log a caught exception
  10. Implementing two-phase initialization with ATL
  11. Getting a strong reference from the this pointer too soon
  12. What is a hard error, and what makes it harder than an easy error?
  13. C++/WinRT gotcha: Not all exceptions derive from hresult_error
  14. In C++/WinRT, how can I await multiple coroutines and capture the results?, part 3
  15. In C++/WinRT, how can I await multiple coroutines and capture the results?, part 2
  16. In C++/WinRT, how can I await multiple coroutines and capture the results?, part 1
  17. After I accidentally denied access to everyone, how do I get access back?
  18. How do I prevent my C++/WinRT implementation class from participating in COM aggregation?
  19. The case of the vector with an impossibly large size
  20. How can I specify icons for my app to use on the Start menu in high contrast mode?
  21. Why doesn’t my code compile when I change a shared_ptr<T>(p) to an equivalent make_shared<T>(p) ?
  22. It rather involved being on the other side of this airtight hatchway: Attacking another program by modifying its memory
  23. How do I prevent my ATL class from participating in COM aggregation? DECLARE_ NOT_ AGGREGATABLE didn’t work

2023 268

December 2023

  1. 2023 year-end link clearance
  2. How to allocate address space with a custom alignment or in a custom address region
  3. On calling Afx­Connection­Advise with bAddRef set to FALSE
  4. What does it mean when the compiler says that it can’t convert something to itself?
  5. Don’t keep state in your XAML item templates; put the state in the items
  6. That time the Word team sent presents to the children of WordPerfect’s executive vice president
  7. If I don’t have any items, what error should my IFolderView::Items method return?
  8. How do I get access to the wParam and lParam of the WM_ QUERY­END­SESSION method from my MFC message handler?
  9. It rather involved being on the other side of this airtight hatchway: Spoofing another program
  10. Microspeak: Locked and loaded
  11. In 2023, the Gävle Goat faces a new threat to its survival
  12. If the RegisterClass function takes ownership of the custom background brush, why is it leaking?
  13. How do I specify an optional string parameter to a Windows Runtime method?
  14. How do I specify an optional parameter to a Windows Runtime method?
  15. How can I work around the absence of default parameters in the Windows Runtime?
  16. What happens if I define one environment variable in terms of the value of another environment variable?
  17. The mysterious second parameter to the x86 ENTER instruction
  18. A simpler version of the task sequencer that doesn’t promise fairness
  19. In C++, how can I make a default parameter be the this pointer of the caller?
  20. In C++, how can I make a member function default parameter depend on this ?
  21. What was the code name for 64-bit Windows?
  22. What is a static chain pointer in the context of calling convention ABI?
  23. Why does the Windows Portable Executable (PE) format have both an import section and input directory?

November 2023

  1. Why does the Windows Portable Executable (PE) format have separate tables for import names and import addresses?, part 2
  2. Why does the Windows Portable Executable (PE) format have separate tables for import names and import addresses?, part 1
  3. A reported vulnerability about getting paid apps for free is really about paying for free apps
  4. In Windows 3.1 and Windows 95, what is a “grabber”?
  5. On harmful overuse of std::move
  6. On the need to keep most event sources alive if you want them to raise events
  7. How can I convert a Windows Runtime Software­Bitmap to a WIC bitmap?
  8. Microspeak revisited: Line of sight
  9. If you’re going to crash on an unhandled exception, you may as well do it sooner rather than later
  10. The theory behind the IHttpFilter interface
  11. What happened to the custom exception description I threw from a C++/WinRT IAsyncAction?
  12. Why does calling a coroutine allocate a lot of stack space even though the coroutine frame is on the heap?
  13. Starting on the other side of this airtight hatchway: Running a program that leaks memory
  14. What is the difference between UuidToString, StringFromCLSID, StringFromIID, and StringFromGUID2?
  15. The case of the invalid argument exception from a method that takes no arguments
  16. A clarification on the multithreading constraints of the Encrypt­Message function
  17. How can I get information about media playing on the system, and optionally control their playback?
  18. “Stop sharing this folder” is not the same as “Never share this folder”
  19. Why doesn’t reduction by modulo work for floating point values?
  20. Why does unsafe multithreaded use of an std:: unordered_ map crash more often than unsafe multithreaded use of a std:: map ?
  21. How come my custom exception message is lost when it is thrown from a IAsyncAction^ ?
  22. More notes on use of the DS_ CONTROL style

October 2023

  1. What is the thread reaper?
  2. What are the dire consequences of not removing all the properties that were set via SetProp ?
  3. How to support a COM interface conditionally in WRL
  4. How to support a COM interface conditionally in C++/WinRT
  5. The format of icon resources, revisited
  6. Why is there a hash of a weak password in the Windows cryptographic libraries?
  7. How do I add a non-copyable, non-movable object to a std::map or std::unordered_map ?
  8. On the failed unrealized promise of Reg­Override­Predef­Key
  9. What’s the difference between setting a page’s protection to PAGE_NOACCESS and freeing it?
  10. How can I check if I’m on a DispatcherQueue’s thread if I can’t call HasThreadAccess?
  11. Microspeak: The As-Appropriate (AA) interviewer
  12. API design principle: Reading a property or adding an event handler should not alter observable behavior
  13. On detecting improper use of std:: enable_ shared_ from_ this
  14. I created an overloaded operator for my C++/WinRT class, but it’s not working
  15. Why does IFileDialog still show non-filesystem folders when I pass FOS_ FORCE­FILE­SYSTEM ?
  16. It rather required being on the other side of this airtight hatchway: Knowing the domain administrator password
  17. Is there any performance advantage to marking a page read-only if I had no intention of writing to it anyway?
  18. A very belated improvement to the filtering of the Browse for Folder dialog so it shows only drive letters
  19. How can I get WideCharToMultiByte to convert strings encoded in UTF-16BE?
  20. On the confusing names for the Windows service SID types
  21. A complaint about Links the Cat, the Office assistant
  22. How do I manually update a remote tracking branch, say, to undo a fetch?

September 2023

  1. Template meta-programming: Avoiding saying a type before it is complete
  2. C++/WinRT gotcha: get_strong() will produce a broken strong reference if destruction has already begun
  3. The dangers of releasing the last strong reference from within its own callback
  4. Why is kernel32.dll running in user mode and not kernel mode, like its name implies?
  5. GetQueueStatus and the queue state
  6. When I try to call an exported function, the target crashes when it tries to call any Windows function
  7. How does Explorer calculate the “Date” of a file?
  8. Why does my C++/WinRT project get unresolved externals for constructors?
  9. Why did the 16-bit _lopen and _lcreat function return -1 on failure instead of 0?
  10. When looking to free up disk space, don’t forget your symbol file caches
  11. How can I prevent myself from using a parameter after I’ve extracted all value from it?
  12. I accidentally performed an operation on INVALID_ HANDLE_ VALUE , and it worked: What just happened?
  13. How do I perform a case-insensitive comparison of two strings in the Deseret script?
  14. The odd cadence of narrative engineering design documents
  15. Any sufficiently advanced uninstaller is indistinguishable from malware
  16. On transferring or copying ABI pointers between smart pointers
  17. A freestanding JavaScript function that uses this is easily mistaken for a constructor
  18. Detecting whether a tree-like data structure contains a cycle
  19. When documentation cautions that something may not happen, that suggests that it normally does happen
  20. Just for fun: What happens when you shift a register by more than the register size?
  21. How do I find out more about the fail-fast exception that occurs when an exception in a PPL task goes unobserved?

August 2023

  1. Diagnosing a crash when trying to call ReadFile via language interop
  2. How can I programmatically obtain the value of the “Make text bigger” slider?
  3. The popularity of DOS/4GW made Windows 95 game compatibility a little easier, but with higher stakes
  4. Just for fun: Which processors prefer sign-extended loads, and which prefer zero-extended loads?
  5. On writing loops in continuation-passing style, part 4
  6. On writing loops in PPL and continuation-passing style, part 3
  7. On writing loops in PPL and continuation-passing style, part 2
  8. On writing loops in PPL and continuation-passing style, part 1
  9. Inside STL: The different types of shared pointer control blocks
  10. Phantom and indulgent shared pointers
  11. What it means when you convert between different shared_ptr s
  12. Inside STL: The shared_ptr constructor and enable_shared_from_this
  13. Inside STL: The shared_ptr constructor vs make_shared
  14. Inside STL: Smart pointers
  15. Inside STL: The array
  16. Inside STL: The deque, implementation
  17. Inside STL: The deque, design
  18. Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset
  19. Inside STL: The map, set, multimap, and multiset
  20. Inside STL: The lists
  21. Inside STL: The string
  22. Inside STL: The vector
  23. Inside STL: The pair and the compressed pair

July 2023

  1. Misinterpreting the misleadingly-named STATUS_ STACK_ BUFFER_ OVERRUN
  2. How to split off an older copy of a file while preserving git line history
  3. Perfect forwarding forwards objects, not braced things that are trying to become objects
  4. On the various ways of creating Windows Runtime delegates in C++/WinRT and C++/CX
  5. Before you try to do something, make sure you can do nothing
  6. Why does IAsyncAction or IAsyncOperation. GetResults() produce a E_ ILLEGAL_ METHOD_ CALL exception?
  7. How to clone a Windows Runtime map in the face of possible concurrent modification, part 3
  8. How to clone a Windows Runtime map in the face of possible concurrent modification, part 2
  9. How to clone a Windows Runtime map in the face of possible concurrent modification, part 1
  10. How to clone a Windows Runtime vector in the face of possible concurrent modification, part 4
  11. Cloning a Windows Runtime vector in the face of possible concurrent modification, denial of service?
  12. How to clone a Windows Runtime vector in the face of possible concurrent modification, part 3
  13. How to clone a Windows Runtime vector in the face of possible concurrent modification, part 2
  14. How to clone a Windows Runtime vector in the face of possible concurrent modification, part 1
  15. Why does the compiler complain about a missing constructor when I’m just resizing my std::vector to a smaller size?
  16. How to wait for multiple C++ coroutines to complete before propagating failure, concluding remarks
  17. How to wait for multiple C++ coroutines to complete before propagating failure, finding the awaiter
  18. How to wait for multiple C++ coroutines to complete before propagating failure, wrapping the awaitable
  19. How to wait for multiple C++ coroutines to complete before propagating failure, preallocating the coroutine frame
  20. How to wait for multiple C++ coroutines to complete before propagating failure, memory allocation failure
  21. How to wait for multiple C++ coroutines to complete before propagating failure, symmetric transfer

June 2023

  1. 2023 mid-year link clearance
  2. How to wait for multiple C++ coroutines to complete before propagating failure, custom promise
  3. How to wait for multiple C++ coroutines to complete before propagating failure, peeling away at a tuple
  4. How to wait for multiple C++ coroutines to complete before propagating failure, false hope
  5. How to wait for multiple C++ coroutines to complete before propagating failure, unhelpful lambda
  6. How to wait for multiple C++ coroutines to complete before propagating failure, initial plunge
  7. What can go wrong if you release an SRWLock from a thread different from the one that acquired it?
  8. How can I find out the last time a user logged on from C++?
  9. The case of the make_shared on a C++/WinRT type
  10. Why is Windows using only even-numbered processors?
  11. Why am I being told about a signed/unsigned comparison, and why only sometimes, and how can I fix it?
  12. The case of the invalid handle despite being managed by an RAII type, part 2
  13. The case of the invalid handle despite being managed by an RAII type
  14. How expensive is it to create a Windows performance counter?
  15. SIDs are really just another a fancy way of creating unique IDs in a decentralized way
  16. The move constructor that you have to declare, even though you don’t want anyone to actually call it
  17. Reordering C++ template type parameters for usability purposes, and type deduction from the future
  18. How can I register a program to auto-relaunch if it crashes or is terminated?, redux
  19. Pulling sleight of hand tricks in a security vulnerability report, episode 2
  20. How can I make WiFi passwords per-user rather than per-system?
  21. It’s great that you provide operator overloads, but it’s also nice to have names
  22. C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 3
  23. C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 2

May 2023

  1. C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 1
  2. How do I change the directory Windows uses for user profiles? revisited
  3. On writing functions that accept any specialization of a C++ template type
  4. Getting a strong reference from the this pointer too late
  5. How can I trigger a recalc of the mouse cursor after I changed some of my internal application state?, follow-up
  6. Don’t name your header file security.h either
  7. On creating (and using) a transforming iterator
  8. Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map or other ordered associative container
  9. On catching exceptions in PPL tasks
  10. What is the opposite of LVM_SORTITEMS ?
  11. How do I free the pointers returned by functions like Get­Token­Information ?
  12. It appears that I’ve never made a complete visit to the Pacific Northwest
  13. Summary of the duck-typing requirements of C++ COM wrappers
  14. What are the duck-typing requirements of C++/WinRT com_ptr ?
  15. What are the duck-typing requirements of wil com_ptr ?
  16. What are the duck-typing requirements of WRL ComPtr ?
  17. What are the duck-typing requirements of ATL CComPtr ?
  18. What are the duck-typing requirements of MFC IPTR ?
  19. What are the duck-typing requirements of _com_ptr_t ?
  20. The case of the crash in a C++/WinRT coroutine: Unpeeling the onion
  21. Why does XAML complain that none of the overloads of winrt::to_hstring could be used?
  22. What can I do if I don’t want my file version number to be a sequence of four integers?
  23. Why does Task Manager disappear briefly when you switch it into or out of Always on top ?
  24. How is it even possible to cheat on a musical performance practical exam?
  25. A quick note about WRL’s Chain­Interfaces template class

April 2023

  1. On the finer points of cancelling timers and wait objects in Windows thread pool
  2. What’s up with this new memory_ order_ consume memory order?
  3. One way to defer work when a re-entrant call is detected
  4. A code comment noting the steps to take when a 256th enum field is added
  5. Why is std::hardware_destructive_interference_size a compile-time constant instead of a run-time value?
  6. Protecting a broker from a failing delegate
  7. Protecting a broker from a failing event handler
  8. The case of the unhandled exception in a brokered Windows Runtime component
  9. No, it is not a security vulnerability that there is no certificate of appreciation for reporting a bug
  10. How can I find the invalid class when C++/WinRT tells me that the class may not be final?
  11. How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 4: Handing it over
  12. How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 3: Filling the SoftwareBitmap directly
  13. How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 2: Via a buffer
  14. How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 1: Via an encoded stream
  15. Why is there a large gap between some of the Windows system metrics indices?
  16. The case of the PasswordVault.Add call that the customer thinks was hung
  17. An ignored exception can be misinterpreted as a hang, particularly in coroutines
  18. How do I modify the contents of a boxed Windows Runtime value?
  19. What is the maximum size of a process environment block?
  20. C++17 creates a practical use of the backward array index operator

March 2023

  1. What is this [uuid(…)] in front of my C++ class declaration?
  2. If you want to watch games on your tractor, please use your own iPad
  3. How can I box a std::optional into a C++/WinRT IInspectable ?
  4. The WM_GETDLGCODE message is a query message and should not modify state
  5. How can I try to escape the disease-ridden hot-tubs known as the TEMP and Downloads directories?
  6. Using the contents of a file to define an MSBuild property
  7. Adventures in application compatibility: The case of the jump into the middle of an instruction from nowhere
  8. How unique must the uIdSubclass parameter be when I call Set­Window­Subclass ?
  9. Why am I getting a weird error about promise_type when I try to write a coroutine? part 2
  10. Why does the usage of the initial registers of a Win32 process depend on whether it is a 32-bit or 64-bit process?
  11. On the proper care and feeding of the enigmatic Get­Distance­Of­Closest­Language­In­List function
  12. Exploiting C++/WinRT CRTP: Property and event declarations
  13. Mind your C++/WinRT namespaces
  14. How can I create a git feature branch that can merge into multiple other branches?
  15. Did Vienna ever exist or was it just misinformation?
  16. The 2023/2024 Seattle Symphony subscription season at a glance
  17. What is the expression language used by the Resource Compiler for non-preprocessor expressions?
  18. When should I use CS_GLOBALCLASS ?
  19. From a Windows app, how can I check whether there is an app installed that implements a particular URI scheme?, part 2
  20. From a Windows app, how can I check whether there is an app installed that implements a particular URI scheme?
  21. Microspeak: Baseball card
  22. I can create a read-only page, but why not a write-only page?
  23. Enumerating Windows clipboard history in PowerShell
  24. Enumerating Windows clipboard history in C++/WinRT and C#
  25. If you want to sort a Windows Runtime collection, you may first want to capture it into something a bit easier to manipulate

February 2023

  1. Once you give away the farm, you can’t take it back: Recovering from a rogue administrator
  2. The unintentionally-expanding scope of the SEM_NOGPFAULTERRORBOX flag
  3. Understanding a mysterious RPC_ E_ WRONG­THREAD exception when we’re on the right thread
  4. Why am I getting an unhandled exception from my C++ function that catches all exceptions?
  5. Avoiding the redundancy of adding the object files to both the primary project and its unit test
  6. Microspeak: Light reading (ironic)
  7. The case of the mysterious "out of bounds" error from CreateUri and memmove
  8. What happens if you co_await a std::future, and why is it a bad idea?
  9. What does it mean when my cross-thread COM call fails with RPC_ E_ SYS_ CALL_ FAILED ?
  10. What are the potentially-erroneous results if you don’t pass NULL as the lpNumberOfBytesRead when issuing overlapped I/O?
  11. Why are the Windows chassis hardware button hotkeys so strange?
  12. Adventures in application compatibility: The case of the display control panel crash on exit
  13. The case of the RPC_ E_ DISCONNECTED error thrown from await_ resume
  14. A more direct and mistake-free way of creating a process in a job object
  15. How can I get the original target of a shortcut without applying any 32-bit adjustments?
  16. The frustration of finding a suitable time to hold a meeting when the participants are evenly spaced around the globe
  17. It rather involved being on the other side of this airtight hatchway: Reading the user’s saved passwords
  18. Inside C++/WinRT: Coroutine completions: Cancellation propagation
  19. Hyperlinking to Hutchison Whampoa Limited is still forbidden
  20. Inside C++/WinRT: Coroutine completions: Avoiding reentrant completion
  21. Inside C++/WinRT: Coroutine completion handlers: Disconnection

January 2023

  1. Inside C++/WinRT: Apartment switching: Error reporting
  2. Inside C++/WinRT: Apartment switching: COM without COM
  3. Inside C++/WinRT: Apartment switching: Unwinding the stack
  4. Inside C++/WinRT: Apartment switching: Bypassing the context callback
  5. Inside C++/WinRT: Apartment switching: Unblocking the outgoing thread
  6. Inside C++/WinRT: Apartment switching: The basic idea
  7. Inside C++/WinRT: Coroutine completions: The oversimplified version
  8. How can I call a method on a derived class from a base class, say, to get a strong reference to the containing object?
  9. Windows Runtime asynchronous operations can fail in two different ways, so make sure you get them both
  10. It rather involved being on the other side of this airtight hatchway: Attacking a user by modifying that user’s files
  11. A trio of dubious denial-of-service security vulnerability reports which are just style points piled on top of nothing
  12. Making C++ primitive types meaningfully movable when they have sentinel values
  13. Adventures in application compatibility: Querying for an internal interface
  14. How should I interpret the various values of NLM_CONNECTIVITY ?
  15. What does it mean when I get a mismatch from MSVC for _COROUTINE_ABI ?
  16. It rather involved being on the other side of this airtight hatchway: Administrator attacking a domain account on the local system
  17. On leading underscores and names reserved by the C and C++ languages
  18. Dubious security vulnerability: Granting access to SIDs that don’t exist yet
  19. How can I force a user to have a specific SID prefix, so that they go into a particular group?
  20. Using perfect (and imperfect) forwarding to simplify C++ wrapper classes
  21. It rather involved being on the other side of this airtight hatchway: Gaining code execution from a Trojan horse
  22. Opinionated notes on the Windows.Data.Json namespace

2022 268

December 2022

  1. 2022 year-end link clearance
  2. When I create a waitable timer with a callback, do I have to wait alertably on that specific timer before the callback will run?
  3. How can I detect programmatically whether Windows is an N or KN version?
  4. After importing a TLB, how do I convert from one type of _com_ptr_t to another?
  5. Why can’t I print when I boot Windows into audit mode?
  6. The worst-selling Microsoft software product of all time: OS/2 for the Mach 20
  7. The case of the recursively hung WM_DRAW­CLIPBOARD message
  8. Is there a fixed virtual address that the system promises never to use for anything, so I can use it?
  9. Running some UI code on a timer at a higher priority than your usual timer messages, or without coalescing
  10. Why doesn’t the BitLocker wizard let me save the BitLocker key on an encrypted drive?
  11. On the large number of ways of expressing Microsoft Visual C++ compiler versions
  12. Why doesn’t Windows use the 64-bit virtual address space below 0x00000000`7ffe0000 ?
  13. Inside C++/WinRT: IReference<T>
  14. In C++/WinRT, how do I create or consume an IReference<T> that wraps a particular value?
  15. Thank you for conference announcement, but it would help if you told me what your conference was about
  16. What does it mean when the compiler tells me that promise_type : is not a member of coroutine_traits<void> ?
  17. How can I do the opposite of compare_exchange and exchange if the value is different ?
  18. If you’re going to wrap a Windows Runtime event, you may as well let the wrapped event source manage the token
  19. Reminder: If you intend to use a C++/WinRT namespace, you must include that namespace’s header file
  20. Trouble connecting to Web sites and services because of certificate errors? Check if you’re being held captive
  21. Instead of a C++ template parlor trick, why not just add support based on whether the header file has already been included?
  22. C++ template parlor tricks: Using a type before it is defined
  23. Not even trying to cross an airtight hatchway: Calling a function in your own process by synthesizing a function pointer

November 2022

  1. I used FILE_FLAG_SEQUENTIAL_SCAN but it didn’t seem to speed up my sequential scanning
  2. Dubious security vulnerability: Reading the files in the WindowsApps folder
  3. What kind of caller diagnostic information can I get from exceptions thrown by C++/WinRT and wil?, C++20 edition
  4. The case of the application that used thread local storage it never allocated
  5. How do I pass a raw pointer to a Windows Runtime function?
  6. How does JavaScript represent output parameters in the Windows Runtime?
  7. Sometimes perfect forwarding can be too perfect: Lazy conversion is lazy
  8. Microspeak: Breaking into jail
  9. What kind of caller diagnostic information can I get from exceptions thrown by C++/WinRT and wil?
  10. On Windows Runtime asynchronous operations with critical progress reports
  11. How soon is too soon to report progress from a C++/WinRT coroutine that implements a Windows Runtime asynchronous operation with progress?
  12. Why won’t C++/WinRT let me co_await a CoreDispatcher or DispatcherQueue ?
  13. It’s important to get the most difficult part out of the way by putting it in the title
  14. How does Windows decide whether your computer has limited or full Internet access?
  15. C++ constexpr parlor tricks: How can I obtain the length of a string at compile time?
  16. If I issue multiple overlapped I/O requests against the same region of a file, will they execute in the order I issued them?
  17. On the dangers of giving a product feature the name “new”
  18. Why don’t Windows functions begin with a pointless MOV EDI,EDI instruction on x86-64?
  19. Why is there a system sound called Asterisk? What sound does an Asterisk make anyway?
  20. My niece is just here for the food
  21. In the debugger, how can I get from a projected type back to the C++/WinRT implementation?
  22. Why am I getting a RPC_E_WRONG_THREAD exception when I’m on the right thread?
  23. How does the dialog manager calculate the average width of a character?
  24. A history of the fd_set , FD_SETSIZE , and how it relates to WinSock
  25. What is a “Select Administrator”? Is that some special elite kind of administrator?

October 2022

  1. How can I test my geolocation code on a system without a GPS?
  2. Setting properties in C++/WinRT is done by a function call, but you need to call the function the right way
  3. Why am I seeing two WRITE requests at the same offset from a single call to WriteFile?
  4. What can or should I do with the cursor handle returned by SetCursor ?
  5. Why are many Windows user interface elements positioned at multiples of 4 or 8 pixels?
  6. Why can’t I programmatically inspect the check boxes in the Security property sheet any more?
  7. What happens if my C++ exception handler itself raises an exception?
  8. Is it true that raising a structured exception from a structured exception handler terminates the process?
  9. Why is there a make_unique ? Why not just overload the unique_ptr constructor?
  10. Why is there a passwords.txt file on my system that’s filled with somebody else’s passwords?
  11. How can I check the integrity level of my process?
  12. The case of the memory corruption from a coroutine that already finished
  13. How can I check whether the user’s network connection is roaming or metered?
  14. One possible reason why your program crashes when submitted to the Microsoft Store, but it runs fine on your machine
  15. Clicking past the warning that you are about to cross the airtight hatchway: Vulnerable file type that you are warned about
  16. On the overloading of the address-of operator & in smart pointer classes
  17. How can I perform a CopyFile, but also flush the file buffers before the destination handle is closed?
  18. The Import Address Table is now write-protected, and what that means for rogue patching
  19. The gotcha of the C++ temporaries that don’t destruct as eagerly as you thought
  20. Starting on the other side of this airtight hatchway: Overwhelming the system
  21. Feel free to stop using IMultiLanguage2::DetectInputCodepage

September 2022

  1. Debugging coroutine handles: Looking for the source of a one-byte memory corruption
  2. I did that merge-as-cherry-pick thing, but my change still didn’t merge correctly
  3. Why does COM express GUIDs in a mix of big-endian and little-endian? Why can’t it just pick a side and stick with it?
  4. Microspeak: Break glass
  5. What does the C++ error “A pointer to a bound function may only be used to call the function” mean?
  6. Why am I receiving SHCNE_ UPDATE­DIR notifications that my code never generates?
  7. How can I get WRL to link my object into its activation factory?
  8. How can I trigger a recalc of the mouse cursor after I changed some of my internal application state?
  9. Janet Jackson had the power to crash laptop computers, follow-up
  10. Why load fs:[0x18] into a register and then dereference that, instead of just going for fs:[n] directly?
  11. Serializing asynchronous operations in C++/WinRT, gotchas and final assembly
  12. Serializing asynchronous operations in C++/WinRT
  13. Creating a lazy-start C++/WinRT coroutine from an eager-start one, part 2
  14. Creating a manual-start C++/WinRT coroutine from an eager-start one, part 1
  15. Serializing asynchronous operations in C#
  16. The case of the APC that never arrives
  17. How do I consume raw COM interfaces from a Windows Runtime metadata file?
  18. It rather involved being on the other side of this airtight hatchway: Replacing a service binary
  19. Commonly-supported Windows shortcuts for pasting without formatting
  20. Is there any meaningful way to compare two Time Travel Debugging positions?
  21. The case of the recursively-acquired non-recursive lock, and how to avoid the unintentional reentrancy
  22. Why am I getting a null pointer crash when trying to call a method on my C++/WinRT object?

August 2022

  1. The x86-64 processor (aka amd64, x64): Whirlwind tour
  2. The AArch64 processor (aka arm64), part 25: The ARM64EC ABI
  3. The AArch64 processor (aka arm64), part 24: Code walkthrough
  4. The AArch64 processor (aka arm64), part 23: Common patterns
  5. The AArch64 processor (aka arm64), part 22: Other kinds of classic prologues and epilogues
  6. The AArch64 processor (aka arm64), part 21: Classic function prologues and epilogues
  7. The AArch64 processor (aka arm64), part 20: The classic calling convention
  8. The AArch64 processor (aka arm64), part 19: Miscellaneous instructions
  9. The AArch64 processor (aka arm64), part 18: Return address protection
  10. The AArch64 processor (aka arm64), part 17: Manipulating flags
  11. The AArch64 processor (aka arm64), part 16: Conditional execution
  12. Janet Jackson had the power to crash laptop computers
  13. The AArch64 processor (aka arm64), part 15: Control transfer
  14. The AArch64 processor (aka arm64), part 14: Barriers
  15. The AArch64 processor (aka arm64), part 13: Atomic access
  16. The AArch64 processor (aka arm64), part 12: Memory access and alignment
  17. The AArch64 processor (aka arm64), part 11: Loading addresses
  18. The AArch64 processor (aka arm64), part 10: Loading constants
  19. The AArch64 processor (aka arm64), part 9: Sign and zero extension
  20. The AArch64 processor (aka arm64), part 8: Bit shifting and rotation
  21. The AArch64 processor (aka arm64), part 7: Bitfield manipulation
  22. The AArch64 processor (aka arm64), part 6: Bitwise operations
  23. The AArch64 processor (aka arm64), part 5: Multiplication and division

July 2022

  1. The AArch64 processor (aka arm64), part 4: Addition and subtraction
  2. The AArch64 processor (aka arm64), part 3: Addressing modes
  3. The AArch64 processor (aka arm64), part 2: Extended register operations
  4. The AArch64 processor (aka arm64), part 1: Introduction
  5. Yes, the 8086 wanted to be mechanically translatable from the 8080, but why not add the ability to indirect through AX, CX and DX?
  6. Using C++/WinRT’s final_release to control which thread destructs your object
  7. Making sure that people use make_unique and make_shared to make your object
  8. My class derives from std::enable_ shared_ from_ this , but shared_ from_ this() doesn’t work
  9. Microspeak: The one-pager
  10. C++ coroutine gotcha: Falling off the end of a function-level catch
  11. Processing a ValueSet or PropertySet even in the face of possible mutation, part 4
  12. Processing a ValueSet or PropertySet even in the face of possible mutation, part 3
  13. Processing a ValueSet or PropertySet even in the face of possible mutation, part 2
  14. Processing a ValueSet or PropertySet even in the face of possible mutation, part 1
  15. How can I provide a Windows Runtime ValueSet or PropertySet while non-intrusively monitoring changes to it?
  16. Windows Runtime observable collections don’t mix well with multithreading
  17. How can I write a coroutine that produces a result but keeps on running?
  18. The empty Windows Runtime string is not just a pretty face
  19. How to write like Raymond: Intentional typographical errors, part 2
  20. The case of the constructor that was being ignored
  21. Under what conditions can I modify the memory that I received in the form a STGMEDIUM ?

June 2022

  1. 2022 mid-year link clearance
  2. How can I build a URL query string in the Windows Runtime?
  3. How can I parse URL query string in the Windows Runtime?
  4. Microspeak: Inside baseball
  5. Starting on the other side of the airtight hatchway: Attacking the batch file parser
  6. The case of the mysterious over-release from deep inside the marshaling infrastructure
  7. Writing a marshal-by-value marshaler, part 2
  8. Understanding the marshaling flags: The free-threaded marshaler
  9. Writing a compound marshaler
  10. On the importance of managing the stream pointer when manipulating marshal data
  11. Writing a marshal-by-value marshaler, part 1
  12. The skeleton marshaler that does default marshaling
  13. An initial look at the mechanics of how COM marshaling is performed
  14. What are the various usage patterns for manually-marshaled interfaces?
  15. Adventures in application compatibility: The case of the PC-relative indirect jump that reads from nowhere
  16. How do I retrieve an extremely large range of cells from Excel if the clipboard functions all time out?
  17. How can I wait more than 30 seconds for a delay-rendered clipboard format to become rendered?
  18. Is there a maximum size for Windows clipboard data? Because I’m getting null for something I know should be there
  19. How to write like Raymond: Contacting another team for the first time
  20. An opinionated comparison of C++ frameworks for consuming and implementing Windows Runtime types
  21. Assessing a read-after free for security implications: The string comparison
  22. Converting between Windows FILETIME and Unix time_t without having to type the magic number 116444736000000000
  23. The case of the COM reference that suddenly went bad in the middle of a coroutine

May 2022

  1. The activeCodePage manifest element can be used for more than just setting UTF-8 as the active code page
  2. On passing iterables of iterables in the Windows Runtime
  3. Why do rescued stack traces often have instability at the start?
  4. Rescuing a stack trace the lazy way on x86-64 (aka amd64) after the debugger gave up
  5. How can I get my FileSavePicker to open in the same folder that was picked by the FileOpenPicker or FolderPicker ?
  6. What is the CreateExplorerShellUnelevatedTask scheduled task?
  7. How does Windows decide whether a newly-created window should use LTR or RTL layout?
  8. Writing a sort comparison function, part 4: descending sort
  9. Writing a sort comparison function, part 3: spaceships
  10. Writing a sort comparison function, part 2: avoid unnecessary expense
  11. Writing a sort comparison function, part 1: basics
  12. How can I synthesize a C++20 three-way comparison from two-way comparisons?
  13. Should I pay attention to the warning that I’m std::move ‘ing from a trivial type? Part 2
  14. Should I pay attention to the warning that I’m std::move ‘ing from a trivial type? Part 1
  15. On ways of finding out when a C++/WinRT IAsyncAction has run to completion
  16. A brief summary of the various versions of the Security Descriptor Definition Language (SDDL)
  17. Why does my overridable Windows Runtime method turn into a protected method, and how can I work around it?
  18. On awaiting a task with a timeout in C++/WinRT
  19. On awaiting a task with a timeout in C#
  20. Producing an empty Windows Runtime type in C++/WinRT
  21. What are these SIDs of the form S-1-15-3-xxx?
  22. What are these SIDs of the form S-1-15-2-xxx?

April 2022

  1. The case of the failed exchange of the vtable slot
  2. What’s up with std::piecewise_construct and std::forward_as_tuple ?
  3. How do I decode a #pragma detect_mismatch error?
  4. Be careful with that thing, it’s a confidential coffee maker
  5. How can I force a WriteFile or ReadFile to complete synchronously or hang, in order to test something?
  6. Trying to create a factory that remembers the parameters to pass to another method
  7. How do I access and customize the IInspectable methods of a Windows Runtime class written in C++/WinRT?
  8. Class template argument deduction may be the new hotness, but we’ll always have maker functions
  9. The Applesoft Compiler (TASC): We have the source code, in a sense
  10. The x86 architecture is the weirdo, part 2
  11. How can I co_await on a Windows Runtime async action or operation with a timeout?
  12. How can I tell the WIL RETURN_ IF_ FAILED macro that some errors are ignorable?
  13. A survey of how implementations of Windows Runtime events deal with errors
  14. Notes on BitLocker and the TPM and the pre-boot password or PIN
  15. Now that computers have more than 4MB of memory, can we get seconds on the taskbar?
  16. Please repeat yourself: The noexcept(noexcept(…)) idiom
  17. If I am getting a DllNotFoundException from Windows 10 N, how do I get the missing DLLs?
  18. All Windows threadpool waits can now be handled by a single thread
  19. Adventures in application compatibility: The case of the RAII type that failed to run its destructor
  20. How are Windows Runtime GUIDs represented in JavaScript?
  21. The std::invoke function does more than invoke functions

March 2022

  1. Should I translate my window class names?
  2. Why am I getting the error message “This is only for weak ref support” when I try to create a C++/WinRT weak reference?
  3. How to become a Senior Detective, according to Murderville
  4. Why are there separate Program Files and Program Files (x86) directories?
  5. Why is every other line of my file mysteriously changed to nonsense Chinese characters?
  6. The 2022/2023 Seattle Symphony subscription season at a glance
  7. Behind C++/WinRT: How does C++/WinRT get the list of implemented interfaces?
  8. Behind C++/WinRT: How does C++/WinRT decide which interfaces are implemented?
  9. Why does C++/WinRT say that first_interface is not a member of winrt::impl::interface_list<> ?
  10. A hypothetical magical musical power: The one-piece wonder
  11. How do I un-ignore an Outlook email thread, and how does it work?
  12. Injected class names: The C++ feature you didn’t even realize that you were using
  13. Making our multiple-interface query more C++-like, part 2
  14. Making our multiple-interface query more C++-like, part 1
  15. Reducing chattiness by querying for multiple interfaces at once, part 2
  16. Reducing chattiness by querying for multiple interfaces at once, part 1
  17. How expensive is PssCaptureSnapshot? How fast is it? How much memory does it consume?
  18. Optimizing code to darken a bitmap, part 5
  19. Optimizing code to darken a bitmap, part 4
  20. Optimizing code to darken a bitmap, part 3
  21. Optimizing code to darken a bitmap, part 2
  22. Optimizing code to darken a bitmap, part 1
  23. If the slim reader/writer lock (SRWLOCK) doesn’t remember who the shared lock owner is, does that mean it’s okay to acquire it recursively?
  24. Filtering out fake keyboards from the GetRawInputDeviceList function
  25. How can I detect whether the system has a keyboard attached? On the GetRawInputDeviceList function
  26. How does Windows decide what instructions to provide for unlocking the PC?

February 2022

  1. Zero-cost exceptions aren’t actually zero cost
  2. How can I monitor changes to the reference count of a C++/WinRT object?
  3. COM asynchronous interfaces, part 9: Asynchronous release, assembling a solution
  4. COM asynchronous interfaces, part 8: Asynchronous release, the problems
  5. COM asynchronous interfaces, part 7: Being called directly when the operation completes
  6. COM asynchronous interfaces, part 6: Learning about completion without polling
  7. COM asynchronous interfaces, part 5: The unreliable server
  8. COM asynchronous interfaces, part 4: Doing work while waiting for the asynchronous operation
  9. COM asynchronous interfaces, part 3: Abandoning the operation after a timeout
  10. COM asynchronous interfaces, part 2: Abandoning the operation
  11. COM asynchronous interfaces, part 1: The basic pattern
  12. Notes on COM aggregation: How do you implement tear-offs in an aggregated object?
  13. Notes on COM aggregation: Obtaining a pointer to your aggregated partner without introducing a reference cycle
  14. How can I find out which processor architectures are supported via emulation by the current system?
  15. The cats sitting on a fence in early builds of Windows 8
  16. On finding the average of two unsigned integers without overflow
  17. The case of the stack overflow exception when the stack is nowhere near overflowing
  18. A closer look at the stack guard page
  19. Gotcha: C++/WinRT weak_ref.get() doesn’t get the weak reference; it gets the strong reference
  20. How do I customize the color of the Windows blue screen?

January 2022

  1. Why does the Windows debugger engine show a bunch of hex digits after one of the DLL names?
  2. How can I recognize whether two handles refer to the same underlying file?
  3. How can I recognize file systems that don’t support 64-bit unique file identifiers?
  4. What are these weird internal Visual C++ runtime functions named NLG?
  5. I deleted a file from Explorer, but it came back when I refreshed, and I get Access Denied if I try to delete it again
  6. The MainWindowHandle property is just a guess based on heuristics
  7. Fixing the crash that seems to be on a std::move operation
  8. The mystery of the crash that seems to be on a std::move operation
  9. The error code you get might not be the one you want
  10. How to write like Raymond: The typing-saver
  11. C# and C++ type aliases and their consequences
  12. Resolving confusion over how to return from a C++ coroutine
  13. The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value
  14. Standing on the shoulders of giants: Let the compiler tell you what the ABI is
  15. Jumping into the middle of an instruction is not as strange as it sounds
  16. How can I detect that a thread pool work item is taking too long?
  17. How do I upgrade a 32-bit tick count to a 64-bit one?
  18. Filling in some gaps in the story of Space Cadet Pinball on 64-bit Windows
  19. How do I prevent folder verbs intended for file system directories from showing up in my shell extension’s virtual folder’s context menu?
  20. My Excel spreadsheet doesn’t scroll even though I can use the arrows to move around
  21. Speculation on the design decisions that led to the common ABI for C++ coroutines

← 2017–2021