diff --git a/src/util/Platforms/Win32/Win32PlatformUtils.cpp b/src/util/Platforms/Win32/Win32PlatformUtils.cpp
index d66a1f8df87e7dfe381aee8d9696b9198148ae2d..eb7d02a0da08e3623a873001fed7d3eeb53792d1 100644
--- a/src/util/Platforms/Win32/Win32PlatformUtils.cpp
+++ b/src/util/Platforms/Win32/Win32PlatformUtils.cpp
@@ -646,11 +646,11 @@ XMLPlatformUtils::compareAndSwap(       void**      toFill
     //  Note we have to cast off the constness of some of these because
     //  the system APIs are not C++ aware in all cases.
     //
-    return ::InterlockedCompareExchange
+    return (void *) ::InterlockedCompareExchange
     (
-        toFill
-        , (void*)newValue
-        , (void*)toCompare
+        (long *)toFill
+        , (long)newValue
+        , (long)toCompare
     );
 
     #endif