2022–2026
1,298 posts
2026 222
October 2026
- The support case of a customer who said that all they could see was a black screen
- C++/WinRT overcorrection: Using make_self and immediately converting it to the projected interface
- Why don’t we run the taskbar and Task Manager at high priority, so they can remain responsive?
- Puzzling out why a program doesn’t work when run from a batch file, but works when double-clicked from Explorer
- Why didn’t we use the COM static store to clean up the unmarshalable delegate?
- Why didn’t we use CoRegisterInitializeSpy to clean up the unmarshalable delegate?
- Why didn’t we use RoRegisterForApartmentShutdown to clean up the unmarshalable delegate?
- Microspeak: Drain the slide, back-up slides
- Why do we need ud2 when int 6 is right there?
- C++ futures part 5: std:: future and std:: shared_future
- C++ futures part 4: What if I want an immediate on-thread std::async ?
- C++ futures part 3: The mental model for std::async
- C++ futures part 2: The mental model for std::promise , std::packaged_task
- C++ futures part 1: The mental model
- One way of thinking about access specifiers in C++/WinRT implementation types
- If one anti-malware software is good, does that make two better?
- How can undefined opcodes ud0 and ud1 have parameters? How undefined were they?
- Why does the compiler sometimes use ud2 and sometimes int 3 for code that shouldn’t execute?
- If somebody tries to hot-patch an already-hot-patched function, how do they avoid conflicts?
- Why is there no Windows hot-patching support for other architectures like 32-bit ARM and MIPS?
- Windows on Itanium also provided for hot-patching, in an even simpler way
September 2026
- Windows on AArch64 also provides for hot-patching, but it’s much simpler than on x86
- As a general rule, calling product support while drunk is not recommended
- C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times
- Debugging walkthrough: Access violation on nonsense instruction, episode 3
- No, really, you need to pass all unhandled messages to DefWindowProc, part 2
- When working with Win32 FILETIME , don’t forget that you have std::chrono now
- A brief history of Windows scroll bar shortcuts
- What’s the highest legal FILETIME ? Is it safe to use?
- Comparing exception behavior of magic statics, std:: call_ once , and std:: async
- std::call_once vs. std::async
- Magic statics vs. std::call_once
- Why do Microsoft job levels start in the high 50’s instead of starting at a sane number like 1?
- Why didn’t ReadDirectoryChangesW provide a way to correlate the two sides of a rename operation?
- How can I remove the Close button from my window caption?
- Why is the x86 undefined instruction called ud2 ? Why 2?
- What algorithm did Windows XP use to choose your initial user picture?
- A sample use of the winstart.bat file in Windows 95
- Why don’t we allow stacks to be sparse, instead of forcing them to be contiguous?
- What happens if you change a window class’s GCL_ CBWNDEXTRA ?
- The case of the progress callback that never got called when progress happened
- The perils of binding to value types in XAML
- Microspeak: Funded / unfunded
August 2026
- AWE does not require PAE, though PAE makes it much more useful
- On forcing all derived classes to implement a specific non-virtual method, part 2
- On forcing all derived classes to implement a specific non-virtual method, part 1
- In the product end game, every change carries significant risk, episode 2
- Why didn’t the Windows Entertainment Pack just run the MS-DOS version inside an emulator?
- Comparing the two holograms on the Windows 95 box
- Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam
- Reducing C++ template bloat by factoring out the type-dependent portions of the function
- On wrapping a callable in a lambda that just calls it with the same parameters
- Why did the Microsoft Entertainment Pack for Windows have a special sticker announcing that it also had Tetris?
- How do functions like alloca allocate memory from the stack?
- Forcing an ARM64X executable to run as a specific architecture
- A little helper class for managing LPPROC_ THREAD_ ATTRIBUTE_ LIST s
- The comments that go into code versus those that go into the pull request description
- The little-known winstart.bat batch file
- How can I perform a CopyFile in unbuffered mode?
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 5
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 4
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 3
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 2
- Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 1
July 2026
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 10
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 9
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 8
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 7
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 6
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 5
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 4
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 3
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 2
- Making an agile version of a Windows Runtime delegate in C++/WinRT, part 1
- Why has the display control panel pointer truncation bug gone unfixed for so long?
- Speculating on how the buggy control panel extension truncated a value that it had right in front of it
- The case of the invalid function pointer when shutting down the display control panel
- Microspeak: Double-click and drill down
- Why don’t we just make the entire stack out of guard pages?
- The case of the mysterious changes to integers when there shouldn’t have been any code generation effect
- I’ve decoded a #pragma detect_mismatch error and fixed the mismatch, but I still get the error
- The other kind of control flow guard check: The combined validate and call
- How did Windows 95 decide that a setup program ran?
- I opened a file with FILE_ FLAG_ DELETE_ ON_ CLOSE , but now I changed my mind
- How did we conclude that CcNamespace.dll was the ringleader of a group of DLLs that unloaded prematurely?
- The case of the thread executing from an unloaded third-party DLL
- It rather involved being on the other side of this airtight hatchway: Changing administrative settings
June 2026
- 2026 mid-year link clearance
- A compatibility note on the abuse of Windows window class extra bytes
- The evolution of window and class extra bytes in Windows
- The case of the DLL that was not present in memory despite not being formally unloaded, part 2
- Raymond’s hot take on Hainanese chicken
- The case of the DLL that was not present in memory despite not being formally unloaded, part 1
- Cancellation of Windows Runtime activities is asynchronous
- Microspeak elaborated: Isn’t escrow just a release candidate by another name?
- In memory of the man who put red and green squiggles under words
- What does it mean when the bottom bit of my HMODULE is set?
- Why doesn’t GetLastInputInfo() return info for the user I’m impersonating?
- Windows stack limit checking retrospective, follow-up
- Retrofitting the WM_ COPYDATA message onto Windows 3.1
- The time the x86 emulator team found code so bad that they fixed it during emulation
- How can I schedule work on a thread pool with low latency?
- Understanding the rationale behind a rule when trying to circumvent it
- What’s the opposite of ClipCursor that lets me exclude the cursor from a region?
- The Microsoft Company Party where everybody played name tag swap
- Rotation revisited: Shuffling more than three blocks, and other small notes
- The back cover of C++: The Programming Language also raises questions not answered by the front cover
- Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition
- Rotation revisited: Cycle decomposition in clang’s libcxx
- Rotation revisited: A shocking discovery about gcc’s unidirectional rotation algorithm
- Rotation revisited: Another unidirectional algorithm
- The placeholder name for the Windows 8 experience was “modern”
May 2026
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 3
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 2
- Sharing the result of a single Windows Runtime IAsyncOperation among multiple coroutines, part 1
- If C# and JavaScript lets me await a Windows Runtime asynchronous operation more than once, why not C++/WinRT?
- A hypothetical redesign of System. Diagnostics. Process to avoid confusion over properties that are valid only when you are the one who called Start
- Why do you say that a COM STA thread must pump messages if I see sample code creating STA threads and not pumping messages?
- How do I use Win32 structures from the Windows Runtime?
- The classic TreeView control lets me sort by name or by lParam, but why not both?
- What is the history of the ERROR_ ARENA_ TRASHED error code?
- Just shows that nobody cares about debugging the parity flag any more
- The case of the CreateFileMapping that always reported ERROR_ ALREADY_ EXISTS
- A constant-space linear-time algorithm for deleting all but the 10 most recent files in a directory
- The case of the hang when the user changed keyboard layouts
- Why do Windows client editions on 32-bit x86 systems artificially limit RAM to 4 GB?
- Additional notes on controlling which handles are inherited by CreateProcess
- Developing more confidence when tracking renames via ReadDirectoryChangesW
- When you upgrade your resource strings to Unicode, don’t forget to specify the L prefix
- Why not have changes in API behavior depend on the SDK you link against?
- A dispute over the TAB key highlights a mismatch between Microsoft and IBM organizational structures
- How do I inform Windows that I’m writing a binary file?
- Developing a cross-process reader/writer lock with limited readers, part 4: Abandonment
April 2026
- Developing a cross-process reader/writer lock with limited readers, part 3: Fairness
- Developing a cross-process reader/writer lock with limited readers, part 2: Taking turns when being grabby
- Developing a cross-process reader/writer lock with limited readers, part 1: A semaphore
- Looking at consequences of passing too few register parameters to a C function on various architectures
- Defending against exceptions in a scope_exit RAII type
- Another crash caused by uninstaller code injection into Explorer
- Mapping the page tables into memory via the page tables
- Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?
- How did code handle 24-bit-per-pixel formats when using video cards with bank-switched memory?
- Forgotten message from the past: LB_ INITSTORAGE
- What’s up with window message 0x0091 ? We’re getting it with unexpected parameters
- Why is there a long delay between a thread exiting and the WaitForSingleObject returning?
- Why was there a red telephone at every receptionist desk?
- Finding a duplicated item in an array of N integers in the range 1 to N − 1
- How do you add or remove a handle from an active WaitForMultipleObjects ?, part 2
- How do you add or remove a handle from an active WaitForMultipleObjects ?
- How do you add or remove a handle from an active MsgWaitForMultipleObjects ?
- Were there any Windows 3.1 programs that were so incompatible with Windows 95 that there was no point trying to patch them?
- Learning to read C++ compiler errors: Illegal use of -> when there is no -> in sight
- How can I use ReadDirectoryChangesW to know when someone is copying a file out of the directory?
- Why doesn’t the system let you declare your own messages to have the same semantics as WM_ COPYDATA ?
- The cover of C++: The Programming Language raises questions not answered by the cover
March 2026
- Before you check if an update caused your problem, check that it wasn’t a problem before the update
- A question about the maximimum number of values in a registry key raises questions about the question
- What if a dialog wants to intercept its own message loop?
- Why doesn’t WM_ ENTERIDLE work if the dialog box is a MessageBox ?
- How can I change a dialog box’s message loop to do a MsgWaitForMultipleObjects instead of GetMessage ?
- Windows 95 defenses against installers that overwrite a file with an older version
- How can I make sure the anti-malware software doesn’t terminate my custom service?
- Windows stack limit checking retrospective: arm64, also known as AArch64
- Windows stack limit checking retrospective: amd64, also known as x86-64
- Windows stack limit checking retrospective: Alpha AXP
- Windows stack limit checking retrospective: x86-32 also known as i386, second try
- Windows stack limit checking retrospective: PowerPC
- Windows stack limit checking retrospective: MIPS
- Windows stack limit checking retrospective: x86-32, also known as i386
- How do compilers ensure that large stack allocations do not skip over the guard page?
- A snappy answer when asked about dressing casually at IBM
- The fine print giveth and the bold print taketh away: The countdown timer
- Learning to read C++ compiler errors: Ambiguous overloaded operator
- When ReadDirectoryChangesW reports that a deletion occurred, how can I learn more about the deleted thing?
- The mystery of the posted message that was dispatched before reaching the main message loop
- Aha, I found a counterexample to the documentation that says that QueryPerformanceCounter never fails
- Just for fun: A survey of write protect notches on floppy disks and other media
- What sort of horrible things happen if my dialog has a non-button with the control ID of IDCANCEL ?
February 2026
- Intercepting messages inside IsDialogMessage , fine-tuning the message filter
- Intercepting messages inside IsDialogMessage , installing the message filter
- Intercepting messages before IsDialogMessage can process them
- Customizing the ways the dialog manager dismisses itself: Isolating the Close pathway
- Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, second (failed) attempt
- The 2026/2027 Seattle Symphony subscription season at a glance
- Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, first (failed) attempt
- Exploring the signals the dialog manager uses for dismissing a dialog
- Could WriteProcessMemory be made faster by avoiding the intermediate buffer?
- Microspeak: Escrow
- It rather involved being on the other side of the airtight hatchway: Tricking(?) a program into reading files
- How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_ CHAR message?
- How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_ KEYDOWN message?
- How do I suppress the hover effects when I put a Win32 common controls ListView in single-click mode?
- How did Windows 95 get permission to put the Weezer video Buddy Holly on the CD?
- What should I do if a wait call reports WAIT_ ABANDONED ?
- How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?, part 2
- How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?
- Super Bowl LX creates an opportunity for symphonic friendly wagering
- How can I prevent the user from changing the widths of ListView columns?
- Some small stories about the giant satellite dish antenna that was behind Microsoft Building 11
- Studying compiler error messages closely: Input file paths
January 2026
- Why not store the SAFEARRAY reference count as a hidden allocation next to the SAFEARRAY ?
- How can I retain access to the data in a SAFEARRAY after my method returns?
- Why did I lose the data even though I called SafeArrayAddRef ?
- A digression on the design and implementation of SafeArrayAddRef and extending APIs in general
- What’s the difference between SafeArrayAccessData and SafeArrayAddRef ?
- C++ has scope_exit for running code at scope exit. C# says “We have scope_exit at home.”
- A simple helper function for attaching a progress handler to a Windows Runtime IAsyncActionWithProgress or IAsyncOperationWithProgress
- On the proper usage of a custom Win32 dialog class
- Microspeak: On fire, putting out fires
- What was the secret sauce that allows for a faster restart of Windows 95 if you hold the shift key?
- How can I get the tab index number from a dialog box control?
- When programs assume that the system will never change, episode 4: Stealing strings
- Clipping the focus item when looking for its on-screen location, part 3
- Clipping the focus item when looking for its on-screen location, part 2
- Clipping the focus item when looking for its on-screen location
- Using Active Accessibility to find out where the focus item is
- Using Active Accessibility to find out where the Windows caret is
- How can I find out where the Windows caret is?
- Swapping two blocks of memory that reside inside a larger block, in constant memory, refinement
- How can you swap two non-adjacent blocks of memory using only forward iterators?
- How can you swap two adjacent blocks of memory using only forward iterators?
- Swapping two blocks of memory that reside inside a larger block, in constant memory
2025 273
December 2025
- 2025 year-end link clearance
- Understanding and mitigating a stack overflow in our task sequencer
- Additional notes on color-keyed overlays as a way of doing smooth video rendering
- The Gävle Goat (Gävlebocken) succumbs in 2025 to a new menace
- How can I detect that the system is running low on memory? Or that my job is running low on memory?
- Why are we worried about memory access semantics? Full barriers should be enough for anybody
- Reading the fine print, episode 4: Holiday promotions
- Why is the last letter of my string not making it to the clipboard?
- Why does my Ctrl + M accelerator key activate when I press the Enter key?
- When irate product support customers demand to speak to Bill Gates
- All the other cool languages have try … finally . C++ says “We have try … finally at home.”
- A shortcut gives me a weird path for a program shortcut that doesn’t point to the executable, so what is it?
- Concluding thoughts on our deep dive into Windows clipboard text conversion
- Deducing the consequences of Windows clipboard text formats on UTF-8
- Why is the Windows clipboard taking the scenic route when converting from CF_ TEXT to CF_ OEMTEXT ?
- Misunderstanding what the Cricket Celebration Bowl is
- The Windows clipboard automatic text conversion algorithm is path-dependent
- Resolving an ambiguity in the Windows clipboard automated text conversion table
- Studying the various locale mismatch scenarios in Windows clipboard text format synthesis
- How does Windows synthesize the CF_ LOCALE clipboard format?
- How does Windows synthesize CF_ UNICODETEXT from CF_ TEXT and vice versa?
- How does Windows synthesize CF_ OEMTEXT from CF_ TEXT and vice versa?
- How can my process read its own standard output?
- How can I read the standard output of an already-running process?
- How do I check whether the user has permission to create files in a directory?
- Microspeak: Big rocks
- How do I get my edit control text to be autoselected when I choose it to be the default focus in my dialog?
November 2025
- How can I have a Win32 drop-down combo box with a read-only edit control?
- Message-only windows are for messaging, not as a convenient victim for hosting UI
- At what point in the Windows development cycle is it too late to change the text of a translatable string?
- The apocryphal origins of the Hot Dog Stand color scheme
- Why does XAML break down when I have an element that is half a billion pixels tall?
- Maybe somebody can explain to me how weak references solve the ODR problem
- In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?
- Is WriteProcessMemory faster than shared memory for transferring data between two processes?
- Microspeak: Little-r
- How can I detect that Windows is running in S-Mode, redux
- I can use WM_ COPY DATA to send a block of data to another window, but how does it send data back?
- Could we use CTAD to simplify the use of WRL’s Callback function?
- Non-recursively deleting a binary tree in constant space: Rotating the tree
- Behind the scenes on how Windows 95 application compatibility patched broken programs
- How did Windows 3.1 distinguish two different programs that happened to share the same executable name?
- Non-recursively deleting a binary tree in constant space: Restructuring the tree
- Non-recursively deleting a binary tree in constant space: Synthesizing the parent pointer
- Non-recursively deleting a binary tree in constant space: Traversal with parent pointers
- The Microsoft SoftCard for the Apple II: Getting two processors to share the same memory
- Why does SHFormatDateTime take an unaligned FILETIME ?
October 2025
- Microspeak: turn into a pumpkin
- Trying to build a XAML tree in code throws a “No installed components were detected” exception
- What to do when you have a crash in the runtime control flow guard check
- How did the Windows 95 user interface code get brought to the Windows NT code base?
- Dubious security vulnerability: Denial of service by loading a very large file
- The early history of the Windows Runtime PropertyValue and why there is a PropertyType.Inspectable that is never used
- Windows Runtime design principle: Properties can be set in any order
- What makes cheap_ steady_ clock faster than std:: chrono:: high_ resolution_ clock ?
- Microspeak: The hockey stick on wheels
- What about the icons in pifmgr.dll?
- Using RAII to remedy a defect where not all code paths performed required exit actions, follow-up
- Using RAII to remedy a defect where not all code paths performed required exit actions
- Why can you increment a reference count with relaxed semantics, but you have to decrement with release semantics?
- I remember taking a screen shot of a video, and when I opened it in Paint, the video was playing in it! What witchcraft is this?
- API design principle: Don’t tempt people to divide by zero
- The self-assignment principle for Windows Runtime properties: Don’t change behavior based on whether a property has been written to
- The self-assignment principle for Windows Runtime properties applies to default values
- Windows Runtime API design principles around read-write properties: Idempotence and self-assignment
- Remembering the end of support for VRML in Internet Explorer
- Code comments should apply to the state of the system at the point the comment “executes”
- Can we get weak functions for static linking? The Visual C++ compiler says “We have weak functions at home”
- The problem with inferring from a function call operator is that there may be more than one
- How do I convert a FILETIME to a C++ clock like std::system_clock or winrt::clock ?
September 2025
- Microspeak: Convicted
- How can I enumerate the overflow icons in the Notification Area without showing them?
- Why didn’t Windows 95 setup install a miniature Windows 95 so that it could be written as a 32-bit program?
- Samples note: Use comments to describe what code does, not what you wish the code would do
- Why is Windows still tinkering with critical sections?
- Another lesson learned from the Windows 98 on-stage USB blue screen
- Why was Windows 3.0’s WinHelp called an online help system when it ran offline?
- Learning to read C++ compiler errors: Not a legal base class
- Can I close a duplicate handle while I’m waiting on the original?
- How can I get my shell thumbnail extractors to run in the same process?
- Translating the STATUS_ STACK_ BUFFER_ OVERRUN status code into customer-ready text
- Why is the name of the Microsoft Wireless Notebook Presenter Mouse 8000 hard-coded into the Bluetooth drivers?
- How can I convert a third party in-process server so it runs in the COM surrogate?
- Why can’t std::apply figure out which overload I intend to use? Only one of then will work!
- The documentation says that CompanyName version information is required, but my program seems to work without it, so how required is it?
- A suggestion to people who assign nicknames to meeting rooms
- Why didn’t Windows 95 simply special-case the laptops that locked up when it executed the HLT instruction?
- The case of the crash on a null pointer even though we checked it for null
- How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 2
- How can I write a C++/WinRT IAsyncOperation<T> where T is not a Windows Runtime type?, part 1
- Dubious security vulnerability: Remembering passwords for recently-opened ZIP files
- Thoughts on creating a tracking pointer class, part 16: Second attempt to use a list
August 2025
- Thoughts on creating a tracking pointer class, part 15: A custom shared pointer
- Thoughts on creating a tracking pointer class, part 14: Nonthrowing moves with the shared tracking pointer
- Thoughts on creating a tracking pointer class, part 13: Restoring the strong exception guarantee
- Thoughts on creating a tracking pointer class, part 12: A shared tracking pointer
- Thoughts on creating a tracking pointer class, part 11: Repairing assignment
- Thoughts on creating a tracking pointer class, part 10: Proper conversion
- Thoughts on creating a tracking pointer class, part 9: Conversion
- Thoughts on creating a tracking pointer class, part 8: Tracking const objects
- Thoughts on creating a tracking pointer class, part 7: Non-modifying trackers, second try
- Thoughts on creating a tracking pointer class, part 6: Non-modifying trackers
- Thoughts on creating a tracking pointer class, part 5: Copying our tracking pointer
- Thoughts on creating a tracking pointer class, part 4: Using a circular doubly linked list
- Thoughts on creating a tracking pointer class, part 3: Using a std::vector
- Thoughts on creating a tracking pointer class, part 2: Using a std::list
- Thoughts on creating a tracking pointer class, part 1: Concept art
- Under what conditions could a ReadFile or WriteFile fail to transfer all of the bytes, and how do I detect that?
- How can I detect that Windows is running in S-Mode?
- How do I disable pieces of the property sheet for a service in the Services MMC snap-in?
- Why are Windows semiannual updates named H1 and H2?
- How can I read more than 4GB of data from a file in a single call to ReadFile ?
- Two related questions about keeping track of PIDs of IPC clients
July 2025
- A consequence of the weird wReserved value at the start of the DECIMAL structure
- In C++/WinRT, how can I await multiple coroutines and capture the results?, part 0
- Why is there a window with no name blocking Windows shutdown?
- API design note: Don’t make up multiple names for the same thing
- How can I confirm in the Windows debugger that I’m looking at a COMDAT-folded function?
- How can I wait until a named object (say a mutex) is created?
- Exploring possible solutions to the inconsistency in how Windows searches case-insensitively for named resources
- Being more adamant about reporting that C++/WinRT was unable to resume execution on a dispatcher thread
- What happens if C++/WinRT is unable to resume execution on a dispatcher thread?
- The case of the invalid instruction exception on an instruction that should never have executed
- If the Window Runtime PropertyValue is for boxing non-inspectables, why is there a PropertyValue.CreateInspectable?
- The Fundamental Failure-Mode Theorem: Systems lie about their proper functioning
- Perhaps not a recommended usage for an emergency power outlet
- There is a std:: chrono:: high_ resolution_ clock , but no low_ resolution_ clock
- Detecting and reporting all unhandled C++ exceptions as well as all unhandled structured exceptions
- Our first attempt to detect and report all unhandled C++ exceptions as well as all unhandled structured exceptions
- When I install an unhandled structured exception filter, why doesn’t std:: terminate get called?
- A walkthrough of the original Microsoft Building 3
- Dubious security vulnerability: If I perform this complex series of manual steps, I can crash a program I am running
- Why doesn’t LVIF_ INDENT work without an image list?
- German language cheat sheet: On changing quantities
- If the FormatMessage function fails, and I requested that it allocate a buffer, do I have to free the buffer?
- Unintended yet somehow entirely expected consequences of marking a COM interface as local
- The sizzle reel that says things that nobody understands
June 2025
- 2025 mid-year link clearance
- Embracing the power of the empty set in API design: Requesting zero items
- Why do I get errors or warnings about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 3
- Why do I get errors about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 2
- Your information has been permanently deleted, for small values of permanently
- Why do I get errors about some weird symbol called ?main@@YAHP$01E$AAV?$Array@PE$AAVString@Platform…, part 1
- Abusing copyright strings to trick software into thinking it’s running on your competitor’s PC
- The MIDL compiler still has trouble with double greater-than signs, sadly
- The case of the invalid handle error when a handle is closed while a thread is waiting on it
- Learning to read C++ compiler errors: Ambiguous symbol errors after including a header file
- You have to tell Get- and SetSecurityInfo the object type, you can’t make it guess
- Funding the Egghead store shopping spree took a little extra legwork
- Writing a helper class for generating a particular category of C callback wrappers around C++ methods
- Thread pool threads are like preschool: Leave things the way you found them
- Why does Windows even have Interlocked functions when we have std::atomic ?
- Removing the MAX_PATH restriction on paths applies only to paths
- Application compatibility for Windows 95 crashed a cash register
- Dubious security vulnerability: Tricking a program into running non-elevated
- Why does C++ think my class is copy-constructible when it can’t be copy-constructed?
- Why do some Windows functions fail if I pass an unaligned Unicode string?
- Riffing on a typo in the name of the opera Turandot
- How can I programmatically find the network path by which a folder has been shared?
- The symbolism of the magnifying glass is not universal
- Stating the obvious about debugging an invalid parameter error when freeing memory
May 2025
- Using an oracle to see where your code is producing the wrong output
- The case of creating new instances when you wanted to use the same one
- How do I convert a WIC bitmap back to a GDI HBITMAP ?
- What was origin of the code name Redpill for Windows 8 feature lockout?
- Why does EnumProcessModules report no modules on a process that was created suspended?
- How can I detect if one of my helper processes is launching child processes?
- How can I create a window the size of the screen without it being treated as a fullscreen window?
- Silly parlor tricks: Promoting a 32-bit value to a 64-bit value when you don’t care about garbage in the upper bits
- Why does Windows report my processor speed twice, with slightly different values?
- Secret passages on Microsoft main campus, episode 3
- What’s with the weird wReserved value at the start of the DECIMAL structure?
- How do I force RunOnce commands to run in a specific order?
- If I mark my thread pool callback as long-running, does it still count toward the thread pool thread limit?
- What is the developer set-up for developing Windows for multiple processor architectures?
- Dubious security vulnerability: A program does not run correctly if you run it the wrong way, redux
- How can I wait for Clipboard History to recognize a clipboard change before I change it again?
- Why doesn’t Clipboard History capture rapid changes to clipboard contents?
- What were the MS-DOS programs that the moricons.dll icons were intended for?
- What were the MS-DOS programs that Windows used the progman.exe stock icons for?
- What were the intended uses of those icons in moricons.dll ?
- Using type aliasing to avoid the ODR problem with conditional compilation, part 2
- Using C++ type aliasing to avoid the ODR problem with conditional compilation, part 1
April 2025
- Why does Windows have trouble finding my Win32 resource if it contains an accented character?
- Protecting Windows users from Janet Jackson’s Rhythm Nation
- Why did Windows 7, for a few months, log on slower if you have a solid color background?
- If we can have std::atomic<std::shared_ptr> , why not std::atomic<com_ptr> ?
- When I define a window class with no default cursor, what is the explanation for the cursors that appear in my client area?
- What resource ID should I give my application’s main icon?
- Microspeak: top of mind
- The ongoing story of seconds on the taskbar
- The case of the feature flag that didn’t stay on long enough, part 2
- The case of the feature flag that didn’t stay on long enough, part 1
- Using the classical model for linking to provide unit test overrides
- There was a lot of imagined dropping tablets in swimming pools
- Dubious security vulnerability: Once I have tricked the user into running a malicious shortcut, I can install malware
- The case of the UI thread that hung in a kernel call
- Function overloading is more flexible (and more convenient) than template function specialization
- Why can’t I use SEC_ LARGE_ PAGES with a file-based file mapping?
- The Goldilocks zone of software stability
- On priority inversion in the use of a spinlock to ensure atomic access to a shared_ptr
- Adding delays to our task sequencer, part 3
- Adding delays to our task sequencer, part 2
- Adding delays to our task sequencer, part 1
- The return of Building 7
March 2025
- If one program blocks shutdown, then all programs block shutdown, revisited
- The 2025/2026 Seattle Symphony subscription season at a glance
- Fixing exception safety in our task_ sequencer
- On launching a dialog when a specific combo box item is selected
- Why does INVALID_ HANDLE_ VALUE cast through a LONG_PTR first?
- We’ll fly you to Atlanta, Texas, and getting to your hotel in Atlanta, Georgia is your problem
- A note on the USB-to-PS/2 mouse adapter that came with Microsoft mouse devices
- On how different Windows ABIs choose how to pass 32-bit values in 64-bit registers
- The case of the critical section that let multiple threads enter a block of code
- What could cause a memory corruption bug to disappear in safe mode?
- You can’t simulate keyboard input with PostMessage, revisited
- Why didn’t Windows 95 setup use a miniature version of Windows 95 as its fallback GUI?
- Dubious security vulnerability: A program does not run correctly if you run it the wrong way
- The case of COM failing to pump messages in a single-threaded COM apartment
- Making sure that a DLL loads only from your application directory
- What are the thread safety requirements of HSTRING and BSTR ?
- What an insightful observation, you get to wear “the hat”
- How do I destroy an ABI pointer that I extracted from a C++/WinRT object?
- To some people, time zones are just a fancy way of sounding important, episode 2
- How can I choose a different C++ constructor at runtime?
- I tried to subscribe to a C++/WinRT event, but my callback was never called
- Microspeak: Respin
- Lexically scoped functions accessing parent locals: The display
February 2025
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 8
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 7
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 6
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 5
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 4
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 3
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 2
- C++/WinRT implementation inheritance: Notes on winrt::implements , part 1
- Your statement is now available, just two hidden flyouts and five clicks away
- API design note: Beware of adding an “Other” enum value
- Investigating an argument-dependent lookup issue and working around it
- A sample implementation of the weak reference pattern for COM callbacks
- Async-Async revisited: What about cancellation?
- Did the Windows 95 setup team forget that MS-DOS can do graphics?
- How does Explorer find the “first” icon in a file
- Using alternate locales to get more interesting case mapping than the C
- The default C locale is not a very interesting one
- On exactly when XAML bindings are evaluated if an element is not yet loaded
- The original name for Flexible Single Master Operations in Active Directory
- On trying to log an exception as it leaves your scope
January 2025
- Creating a generic insertion iterator, part 2
- Creating a generic insertion iterator, part 1
- How do I create an inserter iterator that does unhinted insertion into an associative container like std::map ?
- My electric toothbrush was acting up, so I tried to reboot it
- A pattern for obtaining a single value while holding a lock
- A brief and incomplete comparison of memory corruption detection tools
- Memory corruption from outside the process looks like space aliens
- Be mindful of temporal terms in documents: What is the reference point in time?
- Why is there a bulge on my bicycle tire when I inflate it?
- Why doesn’t the Windows blue screen of death prominently identify the company that created the driver that crashed?
- Reminder: When a C++ object fails to construct, the destructor does not run
- The case of the crash when trying to erase an element from a std::set
- In a C++ class template specialization, how can I call the unspecialized version of a method?
- How does GetUserDefaultGeoName choose between ISO 3166-1 and UN M.49 codes?
- Microspeak: The walk-on topic
- A simplified overview of ways to add or update elements in a std::map
- Why does inadvertently passing a std::string instead of a char const* to a variadic function crash on x86-32 but not x86-64?
- Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 2
- Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 1
- Gesellschaft zur Stärkung der Verben: The German Society for the Irregularization of Verbs
- Emergency power resets on Lenovo, HP, Dell, and Acer laptops
- How can I tell whether a change to a control was due to the user or due to my program?
- Forcing an ERROR_ KEY_ DELETED error when trying to open HKEY_ CURRENT_ USER\ Software
- Could I be getting ERROR_ KEY_ DELETED for HKEY_ CURRENT_ USER\ Software when the user logs off?
- How is it possible to get ERROR_ KEY_ DELETED when I’m creating a key?
2024 267
December 2024
- 2024 year-end link clearance
- Making sure the Microsoft Visual C++ compiler chooses the right source encoding
- How various git diff viewers represent file encoding changes in pull requests
- In C++, failure to meet the requirements does not always mean that you fail if you don’t meet the requirements
- Why are Win32 resources strings bundled at all? And why bundles of 16?
- How can I check if two GUIDs are equal when they are provided as strings?
- A design flaw in the Windows 3D Pipes screen saver pointed out by a customer
- A common proposed solution to certain categories of IFNDR: Getting the linker to verify identical functions
- How do I register a file type for a scripting language so that users get a warning when they run an untrusted script?
- Inside STL: The atomic shared_ptr
- Is there a way to split the git history of a file or combine the histories of two files without a merge commit?
- Microspeak terms that didn’t take hold: airspace, synthetics, and AOI
- Why do we have header files <pshpackN.h> and <poppack.h> instead of just issuing the pragma directly?
- Converting to a derived class from the future: How to cast from a base class to an incomplete derived class?
- API naming principles for conditional operations: On, When, and If
- What is the CONTINUE_IF_FAILED equivalent of RETURN_IF_FAILED ?
- It rather involved being on the other side of this airtight hatchway: Disabling anti-malware scanning
- Learning to read C++ compiler errors: Failing to create a shared_ptr
- Learning to read C++ compiler errors: Nonsensical errors from a function declaration
- Won’t waiting for multiple threads one at a time introduce a severe performance issue?
- Why does my DLL reference count go up by one every time I create and exit a thread?
- Tricks from product support: We’re not smart enough to debug the problem, can you help us?
- News flash: Desire for loud cars correlates with psychopathy and sadism
- An analogy about register preservation rules in calling conventions
November 2024
- Assessing the attack complexity of a race condition security vulnerability
- Why does my program successfully take foreground only when running under the debugger?
- Checking whether a URI refers to a Web site root
- Microspeak: Real estate and Airspace
- How can I know when a window has processed a message that I posted to it?
- In C++, how can I make a default parameter be the this pointer of the caller?, revisited
- How can I detect which menu my item was invoked from?
- How do I determine whether Explorer is showing or hiding file extensions?
- A wrinkle in how Windows 95 setup bootstrapped its initial GUI step
- The operations for reading and writing single elements for C++ standard library maps
- How do I put a non-copyable, non-movable, non-constructible object into a std::optional ?
- Solving the puzzle of trying to put an object into a std::optional
- The puzzle of trying to put an object into a std::optional
- Why did Windows 95 setup use three operating systems?
- Debugger breakpoints are usually implemented by patching the in-memory copy of the code
- The case of a program that crashed on its first instruction
- Why do I observe reads from a memory-mapped file when writing large blocks?
- How do I declare an operator overload for my Windows Runtime class?
- What’s the difference between Display size and Screen size in the Windows 95 display control panel?
- On the limits of time travel in the face of undefined behavior in C
- On locale-aware substring matching, either case-sensitive or case-insensitive
October 2024
- What has case distinction but is neither uppercase nor lowercase?
- I have enabled “take ownership” permission, but I still cannot obtain write access
- Reverse-engineering what a “short” section is
- How useful is the hint passed to the std:: unordered_… collections?
- How can I explicitly specialize a templated C++ constructor, follow-up notes
- It rather involved being on the other side of the airtight hatchway: Defeating ASLR after you’ve gained RCE via ROP
- How do I create a Windows Runtime IRandomAccessStream around a bunch of bytes or a classic COM IStream ?
- Did Windows 95 shrink the default font size of windowed MS-DOS apps?
- Why does adding WS_ MINIMIZEBOX change how my window behaves when the user presses Win + D ?
- Evaluating tail call elimination in the face of return address protection, part 2
- Evaluating tail call elimination in the face of return address protection, part 1
- Effects of classic return address tricks on hardware-assisted return address protection
- A quick introduction to return address protection technologies
- On naming things: The tension between naming something for what it is, what it does, or how it is used
- How can I explicitly specialize a templated C++ constructor?
- A correction to the awaitable lock for C++ PPL tasks
- If threads are created without a message queue, why can I post to them immediately upon creation?
- Microspeak: Run to ground
- A popular but wrong way to convert a string to uppercase or lowercase
- How does the linker decide whether to call WinMain or wWinMain ?
- How can I detect whether the user is running as an elevated administrator (as opposed to a natural administrator)?
- A function for creating an absolute security descriptor from a self-relative one
- Misunderstanding the “Prevent access to registry editing tools” policy
September 2024
- Pulling a single item from a C++ parameter pack by its index, remarks
- The case of the crash when destructing a std::map
- If you’re going to specify the LVS_SORTASCENDING or LVS_SORTDESCENDING style, you had better be telling the truth
- Another example of the Windows Runtime interop pattern: Using the UserConsentVerifier from a Win32 program
- The UserConsentVerifier confirms that the user is there, but it doesn’t protect any data
- Going beyond the empty set: Embracing the power of other empty things
- How can I check that all the changes in a git branch have been cherry-picked or rebased into its upstream branch?
- My window has the WS_ EX_ NOACTIVATE extended style, but it got activated anyway
- More on the mysterious [default_interface] attribute in Windows Runtime classes
- It rather involved being on the other side of this airtight hatchway: Posting completions to somebody else’s I/O completion port
- Some notes on Win32 carets
- The case of the fail-fast crashes coming from the power management system
- How can I tell whether two programs will share drive letter mappings?
- The case of the string being copied from a mysterious pointer to invalid memory, revisited
- Does the Resource Compiler have a separate preprocessor or doesn’t it?
- GitHub trick to find the commit that deleted a file
- The case of the image that came out horribly slanted: Negative stride
- The case of the image that came out horribly slanted: Taking the pitch into account
- The case of the image that came out horribly slanted: Diagnosis
- Why did Windows 95 use blue screen error messages instead of hard error messages?
- The CoInitializeSecurity function demands an absolute security descriptor
August 2024
- In the Windows kernel, what is a LUID, and what makes it loo-ey?
- How is the Windows.Foundation.Uri.Domain property different from Host?
- On the strange status of wchar_t in classic MIDL
- The Microsoft/IBM joint development was built on mutual respect, wait, is respect the right word?
- Thoughts on finding the essential elements of a set
- What if I need to wait for more than MAXIMUM_ WAIT_ OBJECTS threads?
- The role of the activation factory in the Windows Runtime
- What does ERROR_ KEY_ DELETED mean?
- Another tribute to Microsoft history hiding in Building 41
- Constructing nodes of a hand-made linked list, how hard can it be?
- The case of the missing ordinal 380
- Instead of putting a hash in the Portable Executable timestamp field, why not create a separate field for the hash?
- Temporarily dropping a lock: The anti-lock pattern
- A look back at one of the (many) projects code-named Highlander
- Embracing the power of the empty set in API design (and applying this principle to selectors and filters)
- What does it even mean to Close a Windows Runtime asynchronous operation or action?
- Why do I get E_ ACCESSDENIED when trying to access my brokered Windows Runtime object?COM is double-checking the trust level.
- How do I know when the user has finished interacting with the AccountsSettingsPane ?
- It rather involved being on the other side of the airtight hatchway: Disabling a security feature as an administrator
- What are the dire consequences of registering a RunOnce command from my RunOnce command?
- The difference between undefined behavior and ill-formed C++ programs
- What’s the difference between DataPackageView. GetUriAsync and DataPackageView. GetWebLinkAsync ?
July 2024
- How to compress out interior padding in a std::pair and why you don’t want to
- There is no mystery over who wrote the Blue Screen of Death, despite what some may want you to believe
- Why don’t Windows Imaging Component pixel format GUIDs continue their nice pattern?
- What can I do if IMlangConvertCharset is unable to convert from code page 28591 directly to UTF-8?
- In my Visual Studio project, I set my Conformance mode to permissive, but it’s still not permissive
- API naming principle: If there is no direct object, then the direct object is the source object
- Unquoted service paths: The new frontier in script kiddie security vulnerability reports
- Organizing the five creation dispositions of the CreateFile function
- Creating an already-completed asynchronous activity in C++/WinRT, part 9
- Creating an already-completed asynchronous activity in C++/WinRT, part 8
- Creating an already-completed asynchronous activity in C++/WinRT, part 7
- Creating an already-completed asynchronous activity in C++/WinRT, part 6
- Creating an already-completed asynchronous activity in C++/WinRT, part 5
- Creating an already-completed asynchronous activity in C++/WinRT, part 4
- Creating an already-completed asynchronous activity in C++/WinRT, part 3
- Creating an already-completed asynchronous activity in C++/WinRT, part 2
- Creating an already-completed asynchonous activity in C++/WinRT, part 1
- What’s the point of std:: monostate ? You can’t do anything with it!
- How do I produce a Windows Runtime asynchronous activity from C++/WinRT?
- How do I produce a Windows Runtime asynchronous activity from C#?
- How do I produce a Windows Runtime asynchronous activity from C++/CX?
- The history of Alt +number sequences, and why Alt + 9731 sometimes gives you a heart and sometimes a snowman
- 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
- 2024 mid-year link clearance
- Writing a remove_all_pointers type trait, part 2
- Writing a remove_all_pointers type trait, part 1
- Is there a built-in way in C++/WinRT to get the string name for a Windows Runtime enum?
- Microspeak: Fun fork
- Finding a specific value in a sequence of integers that changes by at most 1
- The Windows Runtime winrt:: hstring and the C++ std:: wstring are inter-assignable
- How to convert between different types of counted-string string types
- On the sadness of treating counted strings as null-terminated strings
- The time smart quotes prevented the entire Office division from committing code
- How can I view the list of symbols available in a library?
- Lock-free reference-counting a TLS slot using atomics, part 3
- Lock-free reference-counting a TLS slot using atomics, part 2
- Lock-free reference-counting a TLS slot using atomics, part 1
- The origin story of the Windows 3D Pipes screen saver
- How do I get the name of a SID, and what does it mean when the conversion fails?
- What’s the deal with std::type_identity ?
- Can INI files be Unicode? Yes, they can, but it has to be your idea
- How 16-bit Windows cached INI files for performance
- Why does GlobalLock max out at 255 locks?
- More on harmful overuse of std:: move
May 2024
- A graphical depiction of the steps in building a C++ executable, with XAML and packaging
- A graphical depiction of the steps in building a C++ executable, enhanced for classic Win32
- A graphical depiction of the steps in building a C++ executable, basics
- How can I force a DLL to register itself if it won’t respond to regsvr32 ?
- Is there any difference between StringFromIID and StringFromCLSID ?
- Setting the contents of a Windows Runtime Vector from C++/WinRT in one call
- Creating a prepopulated Windows Runtime Vector from C++/WinRT without going through an explicit std:: vector
- If you have to create a Windows Runtime Vector from C++/WinRT, do it as late as possible
- A blurry photo of the legendary USB Cart of Death
- If you know what interface you want, just pass it directly to CoCreateInstance
- Why can’t I find the injected name of a templated class’s templated base class?
- Pulling a single item from a C++ parameter pack by its index
- Building the most efficient device selector query that selects no devices
- The confidential coffee maker was not the only source of shenanigans at the IBM Boca office
- Before you try to change something, make sure you can change nothing
- An informal comparison of the three major implementations of std::string
- Asking for a DispatcherQueue from a GUI thread you created
- Awaiting a set of handles with a timeout, part 7: Just doing it one at a time
- Awaiting a set of handles with a timeout, part 6: Capturing the handles efficiently
- Awaiting a set of handles with a timeout, part 5: Generalizing the awaiter
- Awaiting a set of handles with a timeout, part 4: Building our own awaiter
- Awaiting a set of handles with a timeout, part 3: Going beyond two
- Awaiting a set of handles with a timeout, part 2: Continuing with two
April 2024
- Awaiting a set of handles with a timeout, part 1: Starting with two
- Awaiting a set of handles in C++/WinRT
- Adding state to the update notification pattern, part 8
- Adding state to the update notification pattern, part 7
- Adding state to the update notification pattern, part 6
- Adding state to the update notification pattern, part 5
- Adding state to the update notification pattern, part 4
- Adding state to the update notification pattern, part 3
- Adding state to the update notification pattern, part 2
- Adding state to the update notification pattern, part 1
- In search of the Ballmer Peak, and other results from SIGBOVIK 2024
- Dubious security vulnerability: Program allows its output to be exfiltrated
- What were the tax consequences of letting Windows 95 team members keep a piece of software as long as they tested it?
- The case of the string being copied from a mysterious pointer to invalid memory
- Why do STANDARD_ RIGHTS_ READ , STANDARD_ RIGHTS_ WRITE , and STANDARD_ RIGHTS_ EXECUTE have the same values?
- How can I find out which process has locked me out of the clipboard?
- If I enumerate all the processes and add up all the GetGuiResources , why doesn’t it match the GR_ GLOBAL value?
- How does the classic Win32 ListView handle incremental searching?
- The case of the exception that a catch (…) didn’t catch
- It rather involved being on the other side of this airtight hatchway: System corruption caused by an administrator
- Windows debugger trick: Breaking when a specific debugger message is printed
- The history of computing, as told by the hallways of Microsoft Building 41
- Subroutine calls in the ancient world, before computers had stacks or heaps
March 2024
- How can I tell C++ that I want to discard a nodiscard value?
- I called CreateEnvironmentBlock with a process’s token, but I didn’t get that process’s environment
- Some choices for encrypting data so that it can be decrypted only by the same user or computer
- Dubious security vulnerability: Manual operations can cause a program to hang
- Why isn’t C++ using my default parameter to deduce a template type?
- Why does my thread get a broken string as its initial parameter?
- Using the DisplayInformation class from a desktop Win32 application, part 2
- Using the DisplayInformation class from a desktop Win32 application, part 1
- How well does C++/WinRT com_ptr support class template argument deduction (CTAD)?
- How well does wil com_ptr support class template argument deduction (CTAD)?
- How well does WRL ComPtr support class template argument deduction (CTAD)?
- How well does ATL CComPtr support class template argument deduction (CTAD)?
- How well does MFC IPTR / CIP support class template argument deduction (CTAD)?
- How well does _com_ptr_t support class template argument deduction (CTAD)?
- Class template argument deduction (CTAD) and C++ COM wrappers: Initial explorations
- The 2024/2025 Seattle Symphony subscription season at a glance
- How can I force a copy of a C++ value?
- In C++/WinRT, you shouldn’t destroy an object while you’re co_await ing it
- How do I make an expression non-movable? What’s the opposite of std::move ?
- In domain\user syntax, you can often use the period as an abbreviation for “this computer”
- Is shadowing a member variable from a base class a bad thing? Maybe, but maybe not.
- C++/WinRT performance trap: Switching to Windows Runtime too soon
February 2024
- If a parameter isn’t used, what should I pass?
- On the whole idea of giving away a reference to yourself at destruction
- Mitigating attacks based on knowing the length of a Windows Hello PIN
- A C# LINQ one-liner to check if exactly one of a set of conditions is met
- Gotcha: Be careful how you shut down your dispatcher queues
- Gotcha: Don’t forget to shut down your dispatcher queues
- Once your object reaches final_release , you are committed to destructing it (eventually)
- Microspeak: Closing out, duping out
- Why can’t I trigger a manual blue screen crash by injecting the magic key sequence?
- If you’re just going to sit there doing nothing, at least do nothing correctly
- Registered command lines are just command lines, not a programming language
- Functions that return the size of a required buffer generally return upper bounds, not tight bounds
- It rather involved being on the other side of this airtight hatchway: Attacking a domain administrator from the local administrator
- How can I get the Windows Runtime HttpClient to display a basic authentication prompt?
- On the virtues of the trailing comma
- How do I suppress the error box that appears when a LoadLibrary fails?
- Why doesn’t my program get fancy drag/drop effects in high contrast mode with CLSID_ DragDropHelper ?
- On using milliseconds as a measure of network latency
- How can I close a thread pool and cancel all work that had been queued to it?
- The case of the invalid parameter error from MeasureOverride
- Using virtual memory placeholders to allocate contiguous address space for multiple purposes
January 2024
- How can I add an environment variable to a process launched via ShellExecuteEx or IContextMenu ?
- Smoothing over the differences (and defects) in the various implementations of IMemoryBuffer
- A comparison of various implementations of the Windows Runtime IMemoryBuffer
- How can I expose a pre-existing block of memory as a Windows Runtime object without copying the data?
- How can I give away a COM reference just before my object destructs?
- The dangerous implementations of the IMemoryBufferReference.Closed event
- The useless IMemoryBufferReference.Closed event
- Accessing a block of memory represented by a Windows Runtime IMemoryBuffer
- The case of the fail-fast trying to log a caught exception
- Implementing two-phase initialization with ATL
- Getting a strong reference from the this pointer too soon
- What is a hard error, and what makes it harder than an easy error?
- C++/WinRT gotcha: Not all exceptions derive from hresult_error
- In C++/WinRT, how can I await multiple coroutines and capture the results?, part 3
- In C++/WinRT, how can I await multiple coroutines and capture the results?, part 2
- In C++/WinRT, how can I await multiple coroutines and capture the results?, part 1
- After I accidentally denied access to everyone, how do I get access back?
- How do I prevent my C++/WinRT implementation class from participating in COM aggregation?
- The case of the vector with an impossibly large size
- How can I specify icons for my app to use on the Start menu in high contrast mode?
- Why doesn’t my code compile when I change a shared_ptr<T>(p) to an equivalent make_shared<T>(p) ?
- It rather involved being on the other side of this airtight hatchway: Attacking another program by modifying its memory
- How do I prevent my ATL class from participating in COM aggregation? DECLARE_ NOT_ AGGREGATABLE didn’t work
2023 268
December 2023
- 2023 year-end link clearance
- How to allocate address space with a custom alignment or in a custom address region
- On calling AfxConnectionAdvise with bAddRef set to FALSE
- What does it mean when the compiler says that it can’t convert something to itself?
- Don’t keep state in your XAML item templates; put the state in the items
- That time the Word team sent presents to the children of WordPerfect’s executive vice president
- If I don’t have any items, what error should my IFolderView::Items method return?
- How do I get access to the wParam and lParam of the WM_ QUERYENDSESSION method from my MFC message handler?
- It rather involved being on the other side of this airtight hatchway: Spoofing another program
- Microspeak: Locked and loaded
- In 2023, the Gävle Goat faces a new threat to its survival
- If the RegisterClass function takes ownership of the custom background brush, why is it leaking?
- How do I specify an optional string parameter to a Windows Runtime method?
- How do I specify an optional parameter to a Windows Runtime method?
- How can I work around the absence of default parameters in the Windows Runtime?
- What happens if I define one environment variable in terms of the value of another environment variable?
- The mysterious second parameter to the x86 ENTER instruction
- A simpler version of the task sequencer that doesn’t promise fairness
- In C++, how can I make a default parameter be the this pointer of the caller?
- In C++, how can I make a member function default parameter depend on this ?
- What was the code name for 64-bit Windows?
- What is a static chain pointer in the context of calling convention ABI?
- Why does the Windows Portable Executable (PE) format have both an import section and input directory?
November 2023
- Why does the Windows Portable Executable (PE) format have separate tables for import names and import addresses?, part 2
- Why does the Windows Portable Executable (PE) format have separate tables for import names and import addresses?, part 1
- A reported vulnerability about getting paid apps for free is really about paying for free apps
- In Windows 3.1 and Windows 95, what is a “grabber”?
- On harmful overuse of std::move
- On the need to keep most event sources alive if you want them to raise events
- How can I convert a Windows Runtime SoftwareBitmap to a WIC bitmap?
- Microspeak revisited: Line of sight
- If you’re going to crash on an unhandled exception, you may as well do it sooner rather than later
- The theory behind the IHttpFilter interface
- What happened to the custom exception description I threw from a C++/WinRT IAsyncAction?
- Why does calling a coroutine allocate a lot of stack space even though the coroutine frame is on the heap?
- Starting on the other side of this airtight hatchway: Running a program that leaks memory
- What is the difference between UuidToString, StringFromCLSID, StringFromIID, and StringFromGUID2?
- The case of the invalid argument exception from a method that takes no arguments
- A clarification on the multithreading constraints of the EncryptMessage function
- How can I get information about media playing on the system, and optionally control their playback?
- “Stop sharing this folder” is not the same as “Never share this folder”
- Why doesn’t reduction by modulo work for floating point values?
- Why does unsafe multithreaded use of an std:: unordered_ map crash more often than unsafe multithreaded use of a std:: map ?
- How come my custom exception message is lost when it is thrown from a IAsyncAction^ ?
- More notes on use of the DS_ CONTROL style
October 2023
- What is the thread reaper?
- What are the dire consequences of not removing all the properties that were set via SetProp ?
- How to support a COM interface conditionally in WRL
- How to support a COM interface conditionally in C++/WinRT
- The format of icon resources, revisited
- Why is there a hash of a weak password in the Windows cryptographic libraries?
- How do I add a non-copyable, non-movable object to a std::map or std::unordered_map ?
- On the failed unrealized promise of RegOverridePredefKey
- What’s the difference between setting a page’s protection to PAGE_NOACCESS and freeing it?
- How can I check if I’m on a DispatcherQueue’s thread if I can’t call HasThreadAccess?
- Microspeak: The As-Appropriate (AA) interviewer
- API design principle: Reading a property or adding an event handler should not alter observable behavior
- On detecting improper use of std:: enable_ shared_ from_ this
- I created an overloaded operator for my C++/WinRT class, but it’s not working
- Why does IFileDialog still show non-filesystem folders when I pass FOS_ FORCEFILESYSTEM ?
- It rather required being on the other side of this airtight hatchway: Knowing the domain administrator password
- Is there any performance advantage to marking a page read-only if I had no intention of writing to it anyway?
- A very belated improvement to the filtering of the Browse for Folder dialog so it shows only drive letters
- How can I get WideCharToMultiByte to convert strings encoded in UTF-16BE?
- On the confusing names for the Windows service SID types
- A complaint about Links the Cat, the Office assistant
- How do I manually update a remote tracking branch, say, to undo a fetch?
September 2023
- Template meta-programming: Avoiding saying a type before it is complete
- C++/WinRT gotcha: get_strong() will produce a broken strong reference if destruction has already begun
- The dangers of releasing the last strong reference from within its own callback
- Why is kernel32.dll running in user mode and not kernel mode, like its name implies?
- GetQueueStatus and the queue state
- When I try to call an exported function, the target crashes when it tries to call any Windows function
- How does Explorer calculate the “Date” of a file?
- Why does my C++/WinRT project get unresolved externals for constructors?
- Why did the 16-bit _lopen and _lcreat function return -1 on failure instead of 0?
- When looking to free up disk space, don’t forget your symbol file caches
- How can I prevent myself from using a parameter after I’ve extracted all value from it?
- I accidentally performed an operation on INVALID_ HANDLE_ VALUE , and it worked: What just happened?
- How do I perform a case-insensitive comparison of two strings in the Deseret script?
- The odd cadence of narrative engineering design documents
- Any sufficiently advanced uninstaller is indistinguishable from malware
- On transferring or copying ABI pointers between smart pointers
- A freestanding JavaScript function that uses this is easily mistaken for a constructor
- Detecting whether a tree-like data structure contains a cycle
- When documentation cautions that something may not happen, that suggests that it normally does happen
- Just for fun: What happens when you shift a register by more than the register size?
- How do I find out more about the fail-fast exception that occurs when an exception in a PPL task goes unobserved?
August 2023
- Diagnosing a crash when trying to call ReadFile via language interop
- How can I programmatically obtain the value of the “Make text bigger” slider?
- The popularity of DOS/4GW made Windows 95 game compatibility a little easier, but with higher stakes
- Just for fun: Which processors prefer sign-extended loads, and which prefer zero-extended loads?
- On writing loops in continuation-passing style, part 4
- On writing loops in PPL and continuation-passing style, part 3
- On writing loops in PPL and continuation-passing style, part 2
- On writing loops in PPL and continuation-passing style, part 1
- Inside STL: The different types of shared pointer control blocks
- Phantom and indulgent shared pointers
- What it means when you convert between different shared_ptr s
- Inside STL: The shared_ptr constructor and enable_shared_from_this
- Inside STL: The shared_ptr constructor vs make_shared
- Inside STL: Smart pointers
- Inside STL: The array
- Inside STL: The deque, implementation
- Inside STL: The deque, design
- Inside STL: The unordered_map, unordered_set, unordered_multimap, and unordered_multiset
- Inside STL: The map, set, multimap, and multiset
- Inside STL: The lists
- Inside STL: The string
- Inside STL: The vector
- Inside STL: The pair and the compressed pair
July 2023
- Misinterpreting the misleadingly-named STATUS_ STACK_ BUFFER_ OVERRUN
- How to split off an older copy of a file while preserving git line history
- Perfect forwarding forwards objects, not braced things that are trying to become objects
- On the various ways of creating Windows Runtime delegates in C++/WinRT and C++/CX
- Before you try to do something, make sure you can do nothing
- Why does IAsyncAction or IAsyncOperation. GetResults() produce a E_ ILLEGAL_ METHOD_ CALL exception?
- How to clone a Windows Runtime map in the face of possible concurrent modification, part 3
- How to clone a Windows Runtime map in the face of possible concurrent modification, part 2
- How to clone a Windows Runtime map in the face of possible concurrent modification, part 1
- How to clone a Windows Runtime vector in the face of possible concurrent modification, part 4
- Cloning a Windows Runtime vector in the face of possible concurrent modification, denial of service?
- How to clone a Windows Runtime vector in the face of possible concurrent modification, part 3
- How to clone a Windows Runtime vector in the face of possible concurrent modification, part 2
- How to clone a Windows Runtime vector in the face of possible concurrent modification, part 1
- Why does the compiler complain about a missing constructor when I’m just resizing my std::vector to a smaller size?
- How to wait for multiple C++ coroutines to complete before propagating failure, concluding remarks
- How to wait for multiple C++ coroutines to complete before propagating failure, finding the awaiter
- How to wait for multiple C++ coroutines to complete before propagating failure, wrapping the awaitable
- How to wait for multiple C++ coroutines to complete before propagating failure, preallocating the coroutine frame
- How to wait for multiple C++ coroutines to complete before propagating failure, memory allocation failure
- How to wait for multiple C++ coroutines to complete before propagating failure, symmetric transfer
June 2023
- 2023 mid-year link clearance
- How to wait for multiple C++ coroutines to complete before propagating failure, custom promise
- How to wait for multiple C++ coroutines to complete before propagating failure, peeling away at a tuple
- How to wait for multiple C++ coroutines to complete before propagating failure, false hope
- How to wait for multiple C++ coroutines to complete before propagating failure, unhelpful lambda
- How to wait for multiple C++ coroutines to complete before propagating failure, initial plunge
- What can go wrong if you release an SRWLock from a thread different from the one that acquired it?
- How can I find out the last time a user logged on from C++?
- The case of the make_shared on a C++/WinRT type
- Why is Windows using only even-numbered processors?
- Why am I being told about a signed/unsigned comparison, and why only sometimes, and how can I fix it?
- The case of the invalid handle despite being managed by an RAII type, part 2
- The case of the invalid handle despite being managed by an RAII type
- How expensive is it to create a Windows performance counter?
- SIDs are really just another a fancy way of creating unique IDs in a decentralized way
- The move constructor that you have to declare, even though you don’t want anyone to actually call it
- Reordering C++ template type parameters for usability purposes, and type deduction from the future
- How can I register a program to auto-relaunch if it crashes or is terminated?, redux
- Pulling sleight of hand tricks in a security vulnerability report, episode 2
- How can I make WiFi passwords per-user rather than per-system?
- It’s great that you provide operator overloads, but it’s also nice to have names
- C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 3
- C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 2
May 2023
- C++/WinRT event handlers that are lambdas with weak pointers to the parent class, part 1
- How do I change the directory Windows uses for user profiles? revisited
- On writing functions that accept any specialization of a C++ template type
- Getting a strong reference from the this pointer too late
- How can I trigger a recalc of the mouse cursor after I changed some of my internal application state?, follow-up
- Don’t name your header file security.h either
- On creating (and using) a transforming iterator
- Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map or other ordered associative container
- On catching exceptions in PPL tasks
- What is the opposite of LVM_SORTITEMS ?
- How do I free the pointers returned by functions like GetTokenInformation ?
- It appears that I’ve never made a complete visit to the Pacific Northwest
- Summary of the duck-typing requirements of C++ COM wrappers
- What are the duck-typing requirements of C++/WinRT com_ptr ?
- What are the duck-typing requirements of wil com_ptr ?
- What are the duck-typing requirements of WRL ComPtr ?
- What are the duck-typing requirements of ATL CComPtr ?
- What are the duck-typing requirements of MFC IPTR ?
- What are the duck-typing requirements of _com_ptr_t ?
- The case of the crash in a C++/WinRT coroutine: Unpeeling the onion
- Why does XAML complain that none of the overloads of winrt::to_hstring could be used?
- What can I do if I don’t want my file version number to be a sequence of four integers?
- Why does Task Manager disappear briefly when you switch it into or out of Always on top ?
- How is it even possible to cheat on a musical performance practical exam?
- A quick note about WRL’s ChainInterfaces template class
April 2023
- On the finer points of cancelling timers and wait objects in Windows thread pool
- What’s up with this new memory_ order_ consume memory order?
- One way to defer work when a re-entrant call is detected
- A code comment noting the steps to take when a 256th enum field is added
- Why is std::hardware_destructive_interference_size a compile-time constant instead of a run-time value?
- Protecting a broker from a failing delegate
- Protecting a broker from a failing event handler
- The case of the unhandled exception in a brokered Windows Runtime component
- No, it is not a security vulnerability that there is no certificate of appreciation for reporting a bug
- How can I find the invalid class when C++/WinRT tells me that the class may not be final?
- How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 4: Handing it over
- How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 3: Filling the SoftwareBitmap directly
- How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 2: Via a buffer
- How can I convert a WIC bitmap to a Windows Runtime SoftwareBitmap? part 1: Via an encoded stream
- Why is there a large gap between some of the Windows system metrics indices?
- The case of the PasswordVault.Add call that the customer thinks was hung
- An ignored exception can be misinterpreted as a hang, particularly in coroutines
- How do I modify the contents of a boxed Windows Runtime value?
- What is the maximum size of a process environment block?
- C++17 creates a practical use of the backward array index operator
March 2023
- What is this [uuid(…)] in front of my C++ class declaration?
- If you want to watch games on your tractor, please use your own iPad
- How can I box a std::optional into a C++/WinRT IInspectable ?
- The WM_GETDLGCODE message is a query message and should not modify state
- How can I try to escape the disease-ridden hot-tubs known as the TEMP and Downloads directories?
- Using the contents of a file to define an MSBuild property
- Adventures in application compatibility: The case of the jump into the middle of an instruction from nowhere
- How unique must the uIdSubclass parameter be when I call SetWindowSubclass ?
- Why am I getting a weird error about promise_type when I try to write a coroutine? part 2
- Why does the usage of the initial registers of a Win32 process depend on whether it is a 32-bit or 64-bit process?
- On the proper care and feeding of the enigmatic GetDistanceOfClosestLanguageInList function
- Exploiting C++/WinRT CRTP: Property and event declarations
- Mind your C++/WinRT namespaces
- How can I create a git feature branch that can merge into multiple other branches?
- Did Vienna ever exist or was it just misinformation?
- The 2023/2024 Seattle Symphony subscription season at a glance
- What is the expression language used by the Resource Compiler for non-preprocessor expressions?
- When should I use CS_GLOBALCLASS ?
- From a Windows app, how can I check whether there is an app installed that implements a particular URI scheme?, part 2
- From a Windows app, how can I check whether there is an app installed that implements a particular URI scheme?
- Microspeak: Baseball card
- I can create a read-only page, but why not a write-only page?
- Enumerating Windows clipboard history in PowerShell
- Enumerating Windows clipboard history in C++/WinRT and C#
- 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
- Once you give away the farm, you can’t take it back: Recovering from a rogue administrator
- The unintentionally-expanding scope of the SEM_NOGPFAULTERRORBOX flag
- Understanding a mysterious RPC_ E_ WRONGTHREAD exception when we’re on the right thread
- Why am I getting an unhandled exception from my C++ function that catches all exceptions?
- Avoiding the redundancy of adding the object files to both the primary project and its unit test
- Microspeak: Light reading (ironic)
- The case of the mysterious "out of bounds" error from CreateUri and memmove
- What happens if you co_await a std::future, and why is it a bad idea?
- What does it mean when my cross-thread COM call fails with RPC_ E_ SYS_ CALL_ FAILED ?
- What are the potentially-erroneous results if you don’t pass NULL as the lpNumberOfBytesRead when issuing overlapped I/O?
- Why are the Windows chassis hardware button hotkeys so strange?
- Adventures in application compatibility: The case of the display control panel crash on exit
- The case of the RPC_ E_ DISCONNECTED error thrown from await_ resume
- A more direct and mistake-free way of creating a process in a job object
- How can I get the original target of a shortcut without applying any 32-bit adjustments?
- The frustration of finding a suitable time to hold a meeting when the participants are evenly spaced around the globe
- It rather involved being on the other side of this airtight hatchway: Reading the user’s saved passwords
- Inside C++/WinRT: Coroutine completions: Cancellation propagation
- Hyperlinking to Hutchison Whampoa Limited is still forbidden
- Inside C++/WinRT: Coroutine completions: Avoiding reentrant completion
- Inside C++/WinRT: Coroutine completion handlers: Disconnection
January 2023
- Inside C++/WinRT: Apartment switching: Error reporting
- Inside C++/WinRT: Apartment switching: COM without COM
- Inside C++/WinRT: Apartment switching: Unwinding the stack
- Inside C++/WinRT: Apartment switching: Bypassing the context callback
- Inside C++/WinRT: Apartment switching: Unblocking the outgoing thread
- Inside C++/WinRT: Apartment switching: The basic idea
- Inside C++/WinRT: Coroutine completions: The oversimplified version
- How can I call a method on a derived class from a base class, say, to get a strong reference to the containing object?
- Windows Runtime asynchronous operations can fail in two different ways, so make sure you get them both
- It rather involved being on the other side of this airtight hatchway: Attacking a user by modifying that user’s files
- A trio of dubious denial-of-service security vulnerability reports which are just style points piled on top of nothing
- Making C++ primitive types meaningfully movable when they have sentinel values
- Adventures in application compatibility: Querying for an internal interface
- How should I interpret the various values of NLM_CONNECTIVITY ?
- What does it mean when I get a mismatch from MSVC for _COROUTINE_ABI ?
- It rather involved being on the other side of this airtight hatchway: Administrator attacking a domain account on the local system
- On leading underscores and names reserved by the C and C++ languages
- Dubious security vulnerability: Granting access to SIDs that don’t exist yet
- How can I force a user to have a specific SID prefix, so that they go into a particular group?
- Using perfect (and imperfect) forwarding to simplify C++ wrapper classes
- It rather involved being on the other side of this airtight hatchway: Gaining code execution from a Trojan horse
- Opinionated notes on the Windows.Data.Json namespace
2022 268
December 2022
- 2022 year-end link clearance
- When I create a waitable timer with a callback, do I have to wait alertably on that specific timer before the callback will run?
- How can I detect programmatically whether Windows is an N or KN version?
- After importing a TLB, how do I convert from one type of _com_ptr_t to another?
- Why can’t I print when I boot Windows into audit mode?
- The worst-selling Microsoft software product of all time: OS/2 for the Mach 20
- The case of the recursively hung WM_DRAWCLIPBOARD message
- Is there a fixed virtual address that the system promises never to use for anything, so I can use it?
- Running some UI code on a timer at a higher priority than your usual timer messages, or without coalescing
- Why doesn’t the BitLocker wizard let me save the BitLocker key on an encrypted drive?
- On the large number of ways of expressing Microsoft Visual C++ compiler versions
- Why doesn’t Windows use the 64-bit virtual address space below 0x00000000`7ffe0000 ?
- Inside C++/WinRT: IReference<T>
- In C++/WinRT, how do I create or consume an IReference<T> that wraps a particular value?
- Thank you for conference announcement, but it would help if you told me what your conference was about
- What does it mean when the compiler tells me that promise_type : is not a member of coroutine_traits<void> ?
- How can I do the opposite of compare_exchange and exchange if the value is different ?
- If you’re going to wrap a Windows Runtime event, you may as well let the wrapped event source manage the token
- Reminder: If you intend to use a C++/WinRT namespace, you must include that namespace’s header file
- Trouble connecting to Web sites and services because of certificate errors? Check if you’re being held captive
- Instead of a C++ template parlor trick, why not just add support based on whether the header file has already been included?
- C++ template parlor tricks: Using a type before it is defined
- Not even trying to cross an airtight hatchway: Calling a function in your own process by synthesizing a function pointer
November 2022
- I used FILE_FLAG_SEQUENTIAL_SCAN but it didn’t seem to speed up my sequential scanning
- Dubious security vulnerability: Reading the files in the WindowsApps folder
- What kind of caller diagnostic information can I get from exceptions thrown by C++/WinRT and wil?, C++20 edition
- The case of the application that used thread local storage it never allocated
- How do I pass a raw pointer to a Windows Runtime function?
- How does JavaScript represent output parameters in the Windows Runtime?
- Sometimes perfect forwarding can be too perfect: Lazy conversion is lazy
- Microspeak: Breaking into jail
- What kind of caller diagnostic information can I get from exceptions thrown by C++/WinRT and wil?
- On Windows Runtime asynchronous operations with critical progress reports
- How soon is too soon to report progress from a C++/WinRT coroutine that implements a Windows Runtime asynchronous operation with progress?
- Why won’t C++/WinRT let me co_await a CoreDispatcher or DispatcherQueue ?
- It’s important to get the most difficult part out of the way by putting it in the title
- How does Windows decide whether your computer has limited or full Internet access?
- C++ constexpr parlor tricks: How can I obtain the length of a string at compile time?
- If I issue multiple overlapped I/O requests against the same region of a file, will they execute in the order I issued them?
- On the dangers of giving a product feature the name “new”
- Why don’t Windows functions begin with a pointless MOV EDI,EDI instruction on x86-64?
- Why is there a system sound called Asterisk? What sound does an Asterisk make anyway?
- My niece is just here for the food
- In the debugger, how can I get from a projected type back to the C++/WinRT implementation?
- Why am I getting a RPC_E_WRONG_THREAD exception when I’m on the right thread?
- How does the dialog manager calculate the average width of a character?
- A history of the fd_set , FD_SETSIZE , and how it relates to WinSock
- What is a “Select Administrator”? Is that some special elite kind of administrator?
October 2022
- How can I test my geolocation code on a system without a GPS?
- Setting properties in C++/WinRT is done by a function call, but you need to call the function the right way
- Why am I seeing two WRITE requests at the same offset from a single call to WriteFile?
- What can or should I do with the cursor handle returned by SetCursor ?
- Why are many Windows user interface elements positioned at multiples of 4 or 8 pixels?
- Why can’t I programmatically inspect the check boxes in the Security property sheet any more?
- What happens if my C++ exception handler itself raises an exception?
- Is it true that raising a structured exception from a structured exception handler terminates the process?
- Why is there a make_unique ? Why not just overload the unique_ptr constructor?
- Why is there a passwords.txt file on my system that’s filled with somebody else’s passwords?
- How can I check the integrity level of my process?
- The case of the memory corruption from a coroutine that already finished
- How can I check whether the user’s network connection is roaming or metered?
- One possible reason why your program crashes when submitted to the Microsoft Store, but it runs fine on your machine
- Clicking past the warning that you are about to cross the airtight hatchway: Vulnerable file type that you are warned about
- On the overloading of the address-of operator & in smart pointer classes
- How can I perform a CopyFile, but also flush the file buffers before the destination handle is closed?
- The Import Address Table is now write-protected, and what that means for rogue patching
- The gotcha of the C++ temporaries that don’t destruct as eagerly as you thought
- Starting on the other side of this airtight hatchway: Overwhelming the system
- Feel free to stop using IMultiLanguage2::DetectInputCodepage
September 2022
- Debugging coroutine handles: Looking for the source of a one-byte memory corruption
- I did that merge-as-cherry-pick thing, but my change still didn’t merge correctly
- 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?
- Microspeak: Break glass
- What does the C++ error “A pointer to a bound function may only be used to call the function” mean?
- Why am I receiving SHCNE_ UPDATEDIR notifications that my code never generates?
- How can I get WRL to link my object into its activation factory?
- How can I trigger a recalc of the mouse cursor after I changed some of my internal application state?
- Janet Jackson had the power to crash laptop computers, follow-up
- Why load fs:[0x18] into a register and then dereference that, instead of just going for fs:[n] directly?
- Serializing asynchronous operations in C++/WinRT, gotchas and final assembly
- Serializing asynchronous operations in C++/WinRT
- Creating a lazy-start C++/WinRT coroutine from an eager-start one, part 2
- Creating a manual-start C++/WinRT coroutine from an eager-start one, part 1
- Serializing asynchronous operations in C#
- The case of the APC that never arrives
- How do I consume raw COM interfaces from a Windows Runtime metadata file?
- It rather involved being on the other side of this airtight hatchway: Replacing a service binary
- Commonly-supported Windows shortcuts for pasting without formatting
- Is there any meaningful way to compare two Time Travel Debugging positions?
- The case of the recursively-acquired non-recursive lock, and how to avoid the unintentional reentrancy
- Why am I getting a null pointer crash when trying to call a method on my C++/WinRT object?
August 2022
- The x86-64 processor (aka amd64, x64): Whirlwind tour
- The AArch64 processor (aka arm64), part 25: The ARM64EC ABI
- The AArch64 processor (aka arm64), part 24: Code walkthrough
- The AArch64 processor (aka arm64), part 23: Common patterns
- The AArch64 processor (aka arm64), part 22: Other kinds of classic prologues and epilogues
- The AArch64 processor (aka arm64), part 21: Classic function prologues and epilogues
- The AArch64 processor (aka arm64), part 20: The classic calling convention
- The AArch64 processor (aka arm64), part 19: Miscellaneous instructions
- The AArch64 processor (aka arm64), part 18: Return address protection
- The AArch64 processor (aka arm64), part 17: Manipulating flags
- The AArch64 processor (aka arm64), part 16: Conditional execution
- Janet Jackson had the power to crash laptop computers
- The AArch64 processor (aka arm64), part 15: Control transfer
- The AArch64 processor (aka arm64), part 14: Barriers
- The AArch64 processor (aka arm64), part 13: Atomic access
- The AArch64 processor (aka arm64), part 12: Memory access and alignment
- The AArch64 processor (aka arm64), part 11: Loading addresses
- The AArch64 processor (aka arm64), part 10: Loading constants
- The AArch64 processor (aka arm64), part 9: Sign and zero extension
- The AArch64 processor (aka arm64), part 8: Bit shifting and rotation
- The AArch64 processor (aka arm64), part 7: Bitfield manipulation
- The AArch64 processor (aka arm64), part 6: Bitwise operations
- The AArch64 processor (aka arm64), part 5: Multiplication and division
July 2022
- The AArch64 processor (aka arm64), part 4: Addition and subtraction
- The AArch64 processor (aka arm64), part 3: Addressing modes
- The AArch64 processor (aka arm64), part 2: Extended register operations
- The AArch64 processor (aka arm64), part 1: Introduction
- Yes, the 8086 wanted to be mechanically translatable from the 8080, but why not add the ability to indirect through AX, CX and DX?
- Using C++/WinRT’s final_release to control which thread destructs your object
- Making sure that people use make_unique and make_shared to make your object
- My class derives from std::enable_ shared_ from_ this , but shared_ from_ this() doesn’t work
- Microspeak: The one-pager
- C++ coroutine gotcha: Falling off the end of a function-level catch
- Processing a ValueSet or PropertySet even in the face of possible mutation, part 4
- Processing a ValueSet or PropertySet even in the face of possible mutation, part 3
- Processing a ValueSet or PropertySet even in the face of possible mutation, part 2
- Processing a ValueSet or PropertySet even in the face of possible mutation, part 1
- How can I provide a Windows Runtime ValueSet or PropertySet while non-intrusively monitoring changes to it?
- Windows Runtime observable collections don’t mix well with multithreading
- How can I write a coroutine that produces a result but keeps on running?
- The empty Windows Runtime string is not just a pretty face
- How to write like Raymond: Intentional typographical errors, part 2
- The case of the constructor that was being ignored
- Under what conditions can I modify the memory that I received in the form a STGMEDIUM ?
June 2022
- 2022 mid-year link clearance
- How can I build a URL query string in the Windows Runtime?
- How can I parse URL query string in the Windows Runtime?
- Microspeak: Inside baseball
- Starting on the other side of the airtight hatchway: Attacking the batch file parser
- The case of the mysterious over-release from deep inside the marshaling infrastructure
- Writing a marshal-by-value marshaler, part 2
- Understanding the marshaling flags: The free-threaded marshaler
- Writing a compound marshaler
- On the importance of managing the stream pointer when manipulating marshal data
- Writing a marshal-by-value marshaler, part 1
- The skeleton marshaler that does default marshaling
- An initial look at the mechanics of how COM marshaling is performed
- What are the various usage patterns for manually-marshaled interfaces?
- Adventures in application compatibility: The case of the PC-relative indirect jump that reads from nowhere
- How do I retrieve an extremely large range of cells from Excel if the clipboard functions all time out?
- How can I wait more than 30 seconds for a delay-rendered clipboard format to become rendered?
- Is there a maximum size for Windows clipboard data? Because I’m getting null for something I know should be there
- How to write like Raymond: Contacting another team for the first time
- An opinionated comparison of C++ frameworks for consuming and implementing Windows Runtime types
- Assessing a read-after free for security implications: The string comparison
- Converting between Windows FILETIME and Unix time_t without having to type the magic number 116444736000000000
- The case of the COM reference that suddenly went bad in the middle of a coroutine
May 2022
- The activeCodePage manifest element can be used for more than just setting UTF-8 as the active code page
- On passing iterables of iterables in the Windows Runtime
- Why do rescued stack traces often have instability at the start?
- Rescuing a stack trace the lazy way on x86-64 (aka amd64) after the debugger gave up
- How can I get my FileSavePicker to open in the same folder that was picked by the FileOpenPicker or FolderPicker ?
- What is the CreateExplorerShellUnelevatedTask scheduled task?
- How does Windows decide whether a newly-created window should use LTR or RTL layout?
- Writing a sort comparison function, part 4: descending sort
- Writing a sort comparison function, part 3: spaceships
- Writing a sort comparison function, part 2: avoid unnecessary expense
- Writing a sort comparison function, part 1: basics
- How can I synthesize a C++20 three-way comparison from two-way comparisons?
- Should I pay attention to the warning that I’m std::move ‘ing from a trivial type? Part 2
- Should I pay attention to the warning that I’m std::move ‘ing from a trivial type? Part 1
- On ways of finding out when a C++/WinRT IAsyncAction has run to completion
- A brief summary of the various versions of the Security Descriptor Definition Language (SDDL)
- Why does my overridable Windows Runtime method turn into a protected method, and how can I work around it?
- On awaiting a task with a timeout in C++/WinRT
- On awaiting a task with a timeout in C#
- Producing an empty Windows Runtime type in C++/WinRT
- What are these SIDs of the form S-1-15-3-xxx?
- What are these SIDs of the form S-1-15-2-xxx?
April 2022
- The case of the failed exchange of the vtable slot
- What’s up with std::piecewise_construct and std::forward_as_tuple ?
- How do I decode a #pragma detect_mismatch error?
- Be careful with that thing, it’s a confidential coffee maker
- How can I force a WriteFile or ReadFile to complete synchronously or hang, in order to test something?
- Trying to create a factory that remembers the parameters to pass to another method
- How do I access and customize the IInspectable methods of a Windows Runtime class written in C++/WinRT?
- Class template argument deduction may be the new hotness, but we’ll always have maker functions
- The Applesoft Compiler (TASC): We have the source code, in a sense
- The x86 architecture is the weirdo, part 2
- How can I co_await on a Windows Runtime async action or operation with a timeout?
- How can I tell the WIL RETURN_ IF_ FAILED macro that some errors are ignorable?
- A survey of how implementations of Windows Runtime events deal with errors
- Notes on BitLocker and the TPM and the pre-boot password or PIN
- Now that computers have more than 4MB of memory, can we get seconds on the taskbar?
- Please repeat yourself: The noexcept(noexcept(…)) idiom
- If I am getting a DllNotFoundException from Windows 10 N, how do I get the missing DLLs?
- All Windows threadpool waits can now be handled by a single thread
- Adventures in application compatibility: The case of the RAII type that failed to run its destructor
- How are Windows Runtime GUIDs represented in JavaScript?
- The std::invoke function does more than invoke functions
March 2022
- Should I translate my window class names?
- Why am I getting the error message “This is only for weak ref support” when I try to create a C++/WinRT weak reference?
- How to become a Senior Detective, according to Murderville
- Why are there separate Program Files and Program Files (x86) directories?
- Why is every other line of my file mysteriously changed to nonsense Chinese characters?
- The 2022/2023 Seattle Symphony subscription season at a glance
- Behind C++/WinRT: How does C++/WinRT get the list of implemented interfaces?
- Behind C++/WinRT: How does C++/WinRT decide which interfaces are implemented?
- Why does C++/WinRT say that first_interface is not a member of winrt::impl::interface_list<> ?
- A hypothetical magical musical power: The one-piece wonder
- How do I un-ignore an Outlook email thread, and how does it work?
- Injected class names: The C++ feature you didn’t even realize that you were using
- Making our multiple-interface query more C++-like, part 2
- Making our multiple-interface query more C++-like, part 1
- Reducing chattiness by querying for multiple interfaces at once, part 2
- Reducing chattiness by querying for multiple interfaces at once, part 1
- How expensive is PssCaptureSnapshot? How fast is it? How much memory does it consume?
- Optimizing code to darken a bitmap, part 5
- Optimizing code to darken a bitmap, part 4
- Optimizing code to darken a bitmap, part 3
- Optimizing code to darken a bitmap, part 2
- Optimizing code to darken a bitmap, part 1
- 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?
- Filtering out fake keyboards from the GetRawInputDeviceList function
- How can I detect whether the system has a keyboard attached? On the GetRawInputDeviceList function
- How does Windows decide what instructions to provide for unlocking the PC?
February 2022
- Zero-cost exceptions aren’t actually zero cost
- How can I monitor changes to the reference count of a C++/WinRT object?
- COM asynchronous interfaces, part 9: Asynchronous release, assembling a solution
- COM asynchronous interfaces, part 8: Asynchronous release, the problems
- COM asynchronous interfaces, part 7: Being called directly when the operation completes
- COM asynchronous interfaces, part 6: Learning about completion without polling
- COM asynchronous interfaces, part 5: The unreliable server
- COM asynchronous interfaces, part 4: Doing work while waiting for the asynchronous operation
- COM asynchronous interfaces, part 3: Abandoning the operation after a timeout
- COM asynchronous interfaces, part 2: Abandoning the operation
- COM asynchronous interfaces, part 1: The basic pattern
- Notes on COM aggregation: How do you implement tear-offs in an aggregated object?
- Notes on COM aggregation: Obtaining a pointer to your aggregated partner without introducing a reference cycle
- How can I find out which processor architectures are supported via emulation by the current system?
- The cats sitting on a fence in early builds of Windows 8
- On finding the average of two unsigned integers without overflow
- The case of the stack overflow exception when the stack is nowhere near overflowing
- A closer look at the stack guard page
- Gotcha: C++/WinRT weak_ref.get() doesn’t get the weak reference; it gets the strong reference
- How do I customize the color of the Windows blue screen?
January 2022
- Why does the Windows debugger engine show a bunch of hex digits after one of the DLL names?
- How can I recognize whether two handles refer to the same underlying file?
- How can I recognize file systems that don’t support 64-bit unique file identifiers?
- What are these weird internal Visual C++ runtime functions named NLG?
- 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
- The MainWindowHandle property is just a guess based on heuristics
- Fixing the crash that seems to be on a std::move operation
- The mystery of the crash that seems to be on a std::move operation
- The error code you get might not be the one you want
- How to write like Raymond: The typing-saver
- C# and C++ type aliases and their consequences
- Resolving confusion over how to return from a C++ coroutine
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value
- Standing on the shoulders of giants: Let the compiler tell you what the ABI is
- Jumping into the middle of an instruction is not as strange as it sounds
- How can I detect that a thread pool work item is taking too long?
- How do I upgrade a 32-bit tick count to a 64-bit one?
- Filling in some gaps in the story of Space Cadet Pinball on 64-bit Windows
- How do I prevent folder verbs intended for file system directories from showing up in my shell extension’s virtual folder’s context menu?
- My Excel spreadsheet doesn’t scroll even though I can use the arrows to move around
- Speculation on the design decisions that led to the common ABI for C++ coroutines