Articles Tagged “C++”
16 articles tagged “C++”, newest first.
-
The Win32 Thread Pool API — Concurrency Without Creating Threads, via CreateThreadpoolWork
Are you spawning CreateThread calls all over your native code? This article explains the Win32 thread pool API redesigned in Vista — the four objects work, t...
-
Named Pipes in Practice — Windows' Standard IPC from Design to Security
A practical guide to named pipes, Windows' standard inter-process communication. This article organises, from primary sources, the choice between byte and me...
-
DllMain and the Loader Lock — The Real Reason You're Told to "Do Nothing in DLL Initialization"
Why you must not call LoadLibrary or synchronize with other threads from DllMain. Drawing on primary sources, this article explains how the loader lock seria...
-
Spurious Wakeups — Why Condition Variables Wake "Without Being Notified" and How to Wait Correctly on Windows
A condition variable's wait can return even when no notification has arrived (a spurious wakeup). This article explains, from the Windows implementation, why...
-
Practical Multithreading Best Practices: C++ Edition — Eliminating Accidents by Structure with RAII and jthread
In C++, multithreading is a world where a data race is undefined behaviour. This article works through the std::thread destructor trap, designing stop mechan...
-
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
How to make child processes die with the parent on Windows: Job Objects, exit propagation, stdout/stderr draining, and watchdog placement, plus a checklist.
-
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
Shared memory is fast IPC, but it does not synchronize itself. How to avoid the classic traps: atomics, ABI and layout, lifetime, permissions, and recovery.
-
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++
Export C entry points from C# with Native AOT and UnmanagedCallersOnly and call them from C/C++ - project setup, string handling, and a working sample.
-
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...