Search notes:

WinAPI: Interlocked* functions

InterlockedDecrement
InterlockedIncrement16
InterlockedIncrement16Acquire
InterlockedIncrement16NoFence
InterlockedIncrement16Release
InterlockedIncrement64
InterlockedIncrementAcquire
InterlockedIncrementAcquire64
InterlockedIncrementNoFence
InterlockedIncrementNoFence64
InterlockedIncrementRelease
InterlockedIncrementRelease64
The Interlocked… functions provide a simple mechanism to synchronize access to data that is shared by multiple threads.
In source file
#include <winnt.h>

extern volatile long gCounter;

InterlockedIncrement(&gCounter);

Index