I added _AFXDLL macro and got the following two errors:
error C2039: \'InterlockedAdd64\': is not a member of \'`global namespace\'\' error C3861: \'Interlock