Articles Tagged “C++”
19 articles tagged “C++”, newest first.
-
Time Travel Debugging — Recording and Rewinding the Bugs That Never Reproduce in Long-Running Apps
A once-a-month bug leaves only its result in a crash dump. Record and rewind execution with WinDbg Time Travel Debugging (TTD): TTD.exe, ring buffers, and TT...
-
Why Arguments Break — The Rules of Windows Command-Line Arguments
Windows passes CreateProcess a single string that the receiver splits. Covers the CommandLineToArgvW, CRT, and .NET rules, ArgumentList, and building it in C++.
-
What Is Left After the Parent Dies — Keeping Child Processes in a Job Object
Why do SDK helpers outlive a killed UI and keep the camera or COM port? Designing child process lifetime with Job Objects, KillOnJobClose, and completion ports.
-
The Win32 Thread Pool API — Concurrency That Does Not Create Threads, with CreateThreadpoolWork
Calling CreateThread everywhere in native code? A primary-source guide to the Win32 thread pool API: the work, timer, wait, and io objects, cleanup groups, a...
-
Named Pipes in Practice — Windows' Standard IPC from Design to Security
A practical guide to named pipes, Windows' standard IPC. Covers byte vs. message mode, servers that handle multiple clients, ACL and impersonation security, ...
-
DllMain and the Loader Lock — The Real Reason You Are Told to "Do Nothing in DLL Initialization"
Why DllMain must not call LoadLibrary or wait on threads: the loader lock serializes DLL notifications, typical deadlocks, deferred initialization, and hang ...
-
Spurious Wakeups — Why a Condition Variable Wakes "Without a Notification" and How to Wait Correctly on Windows
Condition variable waits can wake with no notification (spurious wakeups). Why Windows allows it, and the correct while-and-predicate wait in Win32, C++, and...
-
Practical Multithreading Best Practices: C++ Edition — Designing Failures Out with RAII and jthread
C++ data races are undefined behavior. Learn the std::thread destructor trap, stopping with jthread and stop_token, scoped_lock, atomic's real role, and Win3...
-
DLL and COM Interface Backward Compatibility — A Decision Table for Which Changes Break Callers
Which changes to a DLL or COM component actually break their callers? We lay out the three layers of compatibility — binary, source, and behavioral — a decis...
-
What Is MFC on Windows? Foundational Knowledge for Maintaining Existing Assets
An overview of the Microsoft Foundation Classes (MFC): its relationship to Win32, application structure, message maps, Document/View, DDX/DDV, and the things...
-
A Checklist for Safely Handling Child Processes in Windows Apps
Handling child processes safely in a Windows app depends less on the launch API than on who owns the process tree and how shutdown is designed. This article ...
-
Single-File Distribution of Windows Apps - Single Binaries and the Limits of OS Dependencies
When you want to ship a Windows app as a single EXE, the difference between shipping one artifact and eliminating OS dependencies matters. We work through .N...
-
Shared Memory Pitfalls and Practical Best Practices
The pitfalls of using shared memory in production, and a design that leaves fewer ways to go wrong across synchronization, visibility, lifetime, ABI, and per...
-
How to Fairly Compare the Execution Speed of C#, C++, Java, and Go
How to fairly compare the execution speed of C#, C++, Java, and Go, covering measurement design, warm-up, environment pinning, how to read the statistics, an...
-
How to Burn Images and Text into MP4 Frames with Media Foundation
How to burn an image and text into every frame of an MP4 with Media Foundation and produce a new MP4, organized around the roles of the Source Reader, drawin...
-
How to Convert YUV to RGB with Media Foundation
Two ways to get RGB from YUV in Media Foundation: let the Source Reader output RGB32, or convert NV12/YUY2 yourself with stride and color matrix handled.
-
Extracting a Still Image from an MP4 at a Specific Time with Media Foundation
How to grab the frame closest to a given time in an MP4 with the Source Reader, fix up stride and the RGB32 alpha byte, and save it as a PNG.
-
Calling a C# Native AOT DLL from C/C++
Publish a C# class library as a native DLL with Native AOT and call its UnmanagedCallersOnly entry points from C/C++ - where the setup fits, the implementati...
-
An Introduction to Media Foundation - Understanding the API Through a COM Lens
We explain what Media Foundation is, together with the basic vocabulary of Windows media APIs - COM, HRESULT, IMFSourceReader, MFTs - in the order you should...