Index: src/chext/chext.cpp =================================================================== diff -u -r6609ba39811176f4803f0556db3da30e9e457b9d -r86528d792f82b7ceb7b0fe34345bf66a9656d538 --- src/chext/chext.cpp (.../chext.cpp) (revision 6609ba39811176f4803f0556db3da30e9e457b9d) +++ src/chext/chext.cpp (.../chext.cpp) (revision 86528d792f82b7ceb7b0fe34345bf66a9656d538) @@ -25,7 +25,8 @@ #include "../common/TRegistry.h" #include "DllRegistration.h" -LONG g_DllRefCount = 0; // Reference count of this DLL. +std::atomic g_DllRefCount = 0; + extern HINSTANCE g_hInstance; namespace