What is the best way to use the C++ InterlockedIncrement functionality generic to both 32-bit and 64-bit architectures? (There are separated functions)
Is there a better way than using the #if _W64 preprocessor command?
What is the best way to use the C++ InterlockedIncrement functionality generic to both 32-bit and 64-bit architectures? (There are separated functions)
Is there a better way than using the #if _W64 preprocessor command?
Copyright © 2021 Jogjafile Inc.
The easiest solution, since you're using C++:
Now you can unconditionally call
InterlockedIncrementon either 32 bits or 64 bits variables, in both 32 and 64 bits builds.