I'm porting code written under Visual Studio 2012 to compile with Visual Studio 2015. The code builds OK with Windows 2012.
I have an issue with some code that calls InterlockedIncrement64
. It builds OK for an x64 target, but fails where the target is Win32 and the calling code is managed (i.e. compiled with /clr
), yielding:
error C3861: 'InterlockedIncrement64': identifier not found
Looking in winnt.h, it seems that InterlockedIncrement64
is undefined when the target is Win32 and _MANAGED
is defined.
I can rearrange the code such that InterlockedIncrement64
isn't called for managed code, but I'm still curious to know why this change in behavior has come with Visual Studio 2015.