Articles Tagged “Win32 API”
8 articles tagged “Win32 API”, 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...
-
Apps That Break on Resume from Sleep — How Windows Power Events Work and How to Build Business Apps That Survive Them
You opened the laptop and the business app's connections were dead — the cause is a design that never accounted for sleep. This article covers the WM_POWERBR...
-
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...
-
What "Not Responding" Really Is — How Windows Decides an App Has Hung, and How to Design Apps That Don't
Windows' "Not Responding" is a mechanism in which the OS judges that a window has not retrieved a message for 5 seconds and replaces it with a ghost window. ...
-
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...
-
Decoding Windows Error Codes — The Three-Layer Structure of Win32 Errors, HRESULT, and NTSTATUS
When 0x80004005 appears, decompose it before you search. This article covers the three-layer structure of Win32 errors, HRESULT, and NTSTATUS, the most impor...
-
Practical Multithreading Best Practices: C Edition — Writing Safely the Win32 API Way
The established approach to multithreading in C with Win32 is thread creation via _beginthreadex, SRW locks and condition variables, Interlocked functions, a...