Tidy up uses of Windows.h by adding WindowsWrapper.hpp

This header brings in the Win32 API header, with some small modifications
applied to prevent clashes with our code. This means those modifications
don't need to be made in each place that we bring in Windows.h

Change-Id: Ie817c7a167eccbe1ac6a49d3fc940eef8b2f534d
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
diff --git a/src/armnnUtils/Filesystem.cpp b/src/armnnUtils/Filesystem.cpp
index 6c8175b..886d7da 100644
--- a/src/armnnUtils/Filesystem.cpp
+++ b/src/armnnUtils/Filesystem.cpp
@@ -9,8 +9,7 @@
 #include <sys/stat.h>
 #include <stdio.h>
 #elif defined(_MSC_VER)
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
+#include "WindowsWrapper.hpp"
 #endif
 
 namespace armnnUtils
diff --git a/src/armnnUtils/Processes.cpp b/src/armnnUtils/Processes.cpp
index 0e43e8c..6c216cf 100644
--- a/src/armnnUtils/Processes.cpp
+++ b/src/armnnUtils/Processes.cpp
@@ -8,8 +8,7 @@
 #if defined(__unix__)
 #include <unistd.h>
 #elif defined(_MSC_VER)
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
+#include "WindowsWrapper.hpp"
 #endif
 
 namespace armnnUtils
diff --git a/src/armnnUtils/WindowsWrapper.hpp b/src/armnnUtils/WindowsWrapper.hpp
new file mode 100644
index 0000000..7f02cb1
--- /dev/null
+++ b/src/armnnUtils/WindowsWrapper.hpp
@@ -0,0 +1,17 @@
+//
+// Copyright © 2020 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+// This header brings in the Win32 API header, with some small modifications applied to prevent clashes with our code.
+
+#if defined(_MSC_VER)
+
+#define NOMINMAX    // Prevent definition of min/max macros that interfere with std::min/max
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+// Windows.h defines some names that we don't need and interfere with some of our definition
+#undef TIME_MS      // Instrument.hpp
+#undef CreateEvent  // ITimelineDecoder.hpp
+
+#endif