Index: common/BuildSettings.h
===================================================================
--- common/BuildSettings.h	(revision 11181)
+++ common/BuildSettings.h	(working copy)
@@ -20,36 +20,10 @@
 
 #if MPT_OS_WINDOWS
 
-#if defined(MPT_BUILD_MSVC)
-
-#if defined(MPT_BUILD_TARGET_XP)
-
-#if defined(_M_X64)
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502 // _WIN32_WINNT_WS03
-#endif
-#else // !_M_X64
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501 // _WIN32_WINNT_WINXP
-#endif
-#endif // _M_X64
-
-#else // MPT_BUILD_TARGET
-
-#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
 #endif
 
-#endif // MPT_BUILD_TARGET
-
-#else // !MPT_BUILD_MSVC
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501 // _WIN32_WINNT_WINXP
-#endif
-
-#endif // MPT_BUILD_MSVC
-
 #ifndef WINVER
 #define WINVER       _WIN32_WINNT
 #endif
@@ -121,10 +95,8 @@
 //#define MPT_WITH_ICONV
 //#define MPT_WITH_LTDL
 #if MPT_OS_WINDOWS
-#if (_WIN32_WINNT >= 0x0601)
 #define MPT_WITH_MEDIAFOUNDATION
 #endif
-#endif
 //#define MPT_WITH_MINIMP3
 //#define MPT_WITH_MINIZ
 #define MPT_WITH_MPG123
Index: common/mptLibrary.cpp
===================================================================
--- common/mptLibrary.cpp	(revision 11181)
+++ common/mptLibrary.cpp	(working copy)
@@ -100,7 +100,7 @@
 		if(WindowsVersion.IsAtLeast(mpt::Windows::Version::Win8))
 		{
 			hasKB2533623 = true;
-		} else if(WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista))
+		} else
 		{
 			HMODULE hKernel32DLL = LoadLibraryW(L"kernel32.dll");
 			if(hKernel32DLL)
Index: mptrack/AdvancedConfigDlg.cpp
===================================================================
--- mptrack/AdvancedConfigDlg.cpp	(revision 11181)
+++ mptrack/AdvancedConfigDlg.cpp	(working copy)
@@ -170,11 +170,7 @@
 			if(gi == m_groups.end())
 			{
 				LVGROUP group;
-	#if _WIN32_WINNT >= 0x0600
 				group.cbSize = LVGROUP_V5_SIZE;
-	#else
-				group.cbSize = sizeof(group);
-	#endif
 				group.mask = LVGF_HEADER | LVGF_GROUPID;
 #if MPT_USTRING_MODE_WIDE
 				group.pszHeader = const_cast<wchar_t *>(section.c_str());
Index: mptrack/BuildVariants.cpp
===================================================================
--- mptrack/BuildVariants.cpp	(revision 11181)
+++ mptrack/BuildVariants.cpp	(working copy)
@@ -61,17 +61,17 @@
 {
 	std::vector<BuildVariant> result
 	{
-		// VS2015
+		// VS2017
 #ifdef ENABLE_ASM
-		{ 1, U_("win32old"), false, mpt::Windows::Architecture::x86  , PROCSUPPORT_i586    , 0, 0, mpt::Windows::Version::WinXP   , mpt::Windows::Version::WinXP  , mpt::Wine::Version(1,8,0) },
-		{ 1, U_("win64old"), false, mpt::Windows::Architecture::amd64, PROCSUPPORT_AMD64   , 2, 0, mpt::Windows::Version::WinXP64 , mpt::Windows::Version::WinXP64, mpt::Wine::Version(1,8,0) },
-		{ 2, U_("win32"   ), true , mpt::Windows::Architecture::x86  , PROCSUPPORT_x86_SSE2, 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win7   , mpt::Wine::Version(1,8,0) },
-		{ 2, U_("win64"   ), true , mpt::Windows::Architecture::amd64, PROCSUPPORT_AMD64   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win7   , mpt::Wine::Version(1,8,0) },
+		{ 1, U_("win32old"), false, mpt::Windows::Architecture::x86  , PROCSUPPORT_x86_SSE2, 2, 0, mpt::Windows::Version::WinXP   , mpt::Windows::Version::Win7 , mpt::Wine::Version(1,8,0) },
+		{ 1, U_("win64old"), false, mpt::Windows::Architecture::amd64, PROCSUPPORT_AMD64   , 2, 0, mpt::Windows::Version::WinXP64 , mpt::Windows::Version::Win7 , mpt::Wine::Version(1,8,0) },
+		{ 2, U_("win32"   ), true , mpt::Windows::Architecture::x86  , PROCSUPPORT_x86_SSE2, 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win10, mpt::Wine::Version(3,0,0) },
+		{ 2, U_("win64"   ), true , mpt::Windows::Architecture::amd64, PROCSUPPORT_AMD64   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win10, mpt::Wine::Version(3,0,0) },
 #else
-		{ 1, U_("win32old"), false, mpt::Windows::Architecture::x86  , 0                   , 0, 0, mpt::Windows::Version::WinXP   , mpt::Windows::Version::WinXP  , mpt::Wine::Version(1,8,0) },
-		{ 1, U_("win64old"), false, mpt::Windows::Architecture::amd64, 0                   , 2, 0, mpt::Windows::Version::WinXP64 , mpt::Windows::Version::WinXP64, mpt::Wine::Version(1,8,0) },
-		{ 2, U_("win32"   ), true , mpt::Windows::Architecture::x86  , 0                   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win7   , mpt::Wine::Version(1,8,0) },
-		{ 2, U_("win64"   ), true , mpt::Windows::Architecture::amd64, 0                   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win7   , mpt::Wine::Version(1,8,0) },
+		{ 1, U_("win32old"), false, mpt::Windows::Architecture::x86  , 0                   , 0, 0, mpt::Windows::Version::WinXP   , mpt::Windows::Version::Win7 , mpt::Wine::Version(1,8,0) },
+		{ 1, U_("win64old"), false, mpt::Windows::Architecture::amd64, 0                   , 2, 0, mpt::Windows::Version::WinXP64 , mpt::Windows::Version::Win7 , mpt::Wine::Version(1,8,0) },
+		{ 2, U_("win32"   ), true , mpt::Windows::Architecture::x86  , 0                   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win10, mpt::Wine::Version(3,0,0) },
+		{ 2, U_("win64"   ), true , mpt::Windows::Architecture::amd64, 0                   , 2, 0, mpt::Windows::Version::WinVista, mpt::Windows::Version::Win10, mpt::Wine::Version(3,0,0) },
 #endif
 	};
 	std::stable_sort(result.begin(), result.end(), CompareBuildVariantsByScore);
Index: mptrack/ExceptionHandler.cpp
===================================================================
--- mptrack/ExceptionHandler.cpp	(revision 11181)
+++ mptrack/ExceptionHandler.cpp	(working copy)
@@ -672,7 +672,6 @@
 
 void ExceptionHandler::ConfigureSystemHandler()
 {
-#if (_WIN32_WINNT >= 0x0600)
 	if(delegateToWindowsHandler)
 	{
 		//SetErrorMode(0);
@@ -681,15 +680,6 @@
 	{
 		g_OriginalErrorMode = ::SetErrorMode(::GetErrorMode() | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
 	}
-#else // _WIN32_WINNT < 0x0600
-	if(delegateToWindowsHandler)
-	{
-		g_OriginalErrorMode = ::SetErrorMode(0);
-	} else
-	{
-		g_OriginalErrorMode = ::SetErrorMode(::SetErrorMode(0) | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
-	}
-#endif // _WIN32_WINNT
 }
 
 
Index: mptrack/HTTP.cpp
===================================================================
--- mptrack/HTTP.cpp	(revision 11181)
+++ mptrack/HTTP.cpp	(working copy)
@@ -447,25 +447,6 @@
 }
 
 
-Request &Request::InsecureTLSDowngradeWindowsXP()
-{
-	if(mpt::Windows::IsOriginal() && mpt::Windows::Version::Current().IsBefore(mpt::Windows::Version::WinVista))
-	{
-		// TLS 1.0 is not enabled by default until IE7. Since WinInet won't let us override this setting, we cannot assume that HTTPS
-		// is going to work on older systems. Besides... Windows XP is already enough of a security risk by itself. :P
-		if(protocol == Protocol::HTTPS)
-		{
-			protocol = Protocol::HTTP;
-		}
-		if(port == PortHTTPS)
-		{
-			port = PortHTTP;
-		}
-	}
-	return *this;
-}
-
-
 Result SimpleGet(InternetSession &internet, Protocol protocol, const mpt::ustring &host, const mpt::ustring &path)
 {
 	HTTP::Request request;
Index: mptrack/HTTP.h
===================================================================
--- mptrack/HTTP.h	(revision 11181)
+++ mptrack/HTTP.h	(working copy)
@@ -175,7 +175,6 @@
 	mpt::const_byte_span data;
 
 	Request &SetURI(const URI &uri);
-	Request &InsecureTLSDowngradeWindowsXP();
 
 	Result operator()(InternetSession &internet) const;
 };
Index: mptrack/Image.cpp
===================================================================
--- mptrack/Image.cpp	(revision 11181)
+++ mptrack/Image.cpp	(working copy)
@@ -61,29 +61,7 @@
 static CComPtr<IStream> GetStream(mpt::const_byte_span data)
 {
 	CComPtr<IStream> stream;
-#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
 	stream.Attach(SHCreateMemStream(mpt::byte_cast<const unsigned char*>(data.data()), mpt::saturate_cast<UINT>(data.size())));
-#else
-	HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, data.size());
-	if(hGlobal == NULL)
-	{
-		throw bad_image();
-	}
-	void * mem = GlobalLock(hGlobal);
-	if(!mem)
-	{
-		hGlobal = GlobalFree(hGlobal);
-		throw bad_image();
-	}
-	std::memcpy(mem, data.data(), data.size());
-	GlobalUnlock(hGlobal);
-	if(CreateStreamOnHGlobal(hGlobal, TRUE, &stream) != S_OK)
-	{
-		hGlobal = GlobalFree(hGlobal);
-		throw bad_image();
-	}
-	hGlobal = NULL;
-#endif
 	if(!stream)
 	{
 		throw bad_image();
Index: mptrack/MPTrackLink.cpp
===================================================================
--- mptrack/MPTrackLink.cpp	(revision 11181)
+++ mptrack/MPTrackLink.cpp	(working copy)
@@ -29,6 +29,7 @@
 #pragma comment(lib, "dmoguids.lib")
 #pragma comment(lib, "strmiids.lib")
 
+#pragma comment(lib, "avrt.lib")
 #pragma comment(lib, "dsound.lib")
 #pragma comment(lib, "winmm.lib")
 
Index: mptrack/UpdateCheck.cpp
===================================================================
--- mptrack/UpdateCheck.cpp	(revision 11181)
+++ mptrack/UpdateCheck.cpp	(working copy)
@@ -357,7 +357,7 @@
 	request.method = HTTP::Method::Get;
 	request.flags = HTTP::NoCache;
 
-	HTTP::Result resultHTTP = internet(request.InsecureTLSDowngradeWindowsXP());
+	HTTP::Result resultHTTP = internet(request);
 
 	if(settings.sendStatistics)
 	{
@@ -376,7 +376,7 @@
 		std::string jsondata = GetStatisticsDataV3(settings);
 		MPT_LOG(LogInformation, "Update", mpt::ToUnicode(mpt::CharsetUTF8, jsondata));
 		requestStatistics.data = mpt::byte_cast<mpt::const_byte_span>(mpt::as_span(jsondata));
-		internet(requestStatistics.InsecureTLSDowngradeWindowsXP());
+		internet(requestStatistics);
 	}
 
 	// Retrieve HTTP status code.
Index: mptrack/wine/Native.cpp
===================================================================
--- mptrack/wine/Native.cpp	(revision 11181)
+++ mptrack/wine/Native.cpp	(working copy)
@@ -16,6 +16,7 @@
 
 #pragma comment(lib, "strmiids.lib")
 
+#pragma comment(lib, "avrt.lib")
 #pragma comment(lib, "dsound.lib")
 #pragma comment(lib, "winmm.lib")
 
Index: sounddev/SoundDeviceDirectSound.cpp
===================================================================
--- sounddev/SoundDeviceDirectSound.cpp	(revision 11181)
+++ sounddev/SoundDeviceDirectSound.cpp	(working copy)
@@ -332,7 +332,7 @@
 	}
 	m_dwWritePos = 0xFFFFFFFF;
 	SetWakeupInterval(std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond())));
-	m_Flags.NeedsClippedFloat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista));
+	m_Flags.NeedsClippedFloat = GetSysInfo().IsOriginal();
 	return true;
 }
 
Index: sounddev/SoundDeviceManager.cpp
===================================================================
--- sounddev/SoundDeviceManager.cpp	(revision 11181)
+++ sounddev/SoundDeviceManager.cpp	(working copy)
@@ -198,16 +198,6 @@
 		typePriorities[SoundDevice::TypePORTAUDIO_DS] = 16;
 		typePriorities[U_("Wine-Native-PortAudio-8")] = 9; // ALSA
 		typePriorities[SoundDevice::TypePORTAUDIO_WDMKS] = -1;
-	} else if(GetSysInfo().WindowsVersion.IsBefore(mpt::Windows::Version::WinVista))
-	{ // WinXP
-		typePriorities[SoundDevice::TypeWAVEOUT] = 29;
-		typePriorities[SoundDevice::TypeASIO] = 28;
-		typePriorities[U_("RtAudio-WINDOWS_DS")] = 27;
-		typePriorities[SoundDevice::TypePORTAUDIO_WDMKS] = 26;
-		typePriorities[SoundDevice::TypePORTAUDIO_WMME] = 19;
-		typePriorities[SoundDevice::TypeDSOUND] = 17;
-		typePriorities[SoundDevice::TypePORTAUDIO_DS] = 7;
-		typePriorities[SoundDevice::TypePORTAUDIO_WASAPI] = -1;
 	} else if(GetSysInfo().WindowsVersion.IsBefore(mpt::Windows::Version::Win7))
 	{ // Vista
 		typePriorities[SoundDevice::TypeWAVEOUT] = 29;
Index: sounddev/SoundDevicePortAudio.cpp
===================================================================
--- sounddev/SoundDevicePortAudio.cpp	(revision 11181)
+++ sounddev/SoundDevicePortAudio.cpp	(working copy)
@@ -127,10 +127,10 @@
 		framesPerBuffer = paFramesPerBufferUnspecified; // let portaudio choose
 	} else if(m_HostApiType == paMME)
 	{
-		m_Flags.NeedsClippedFloat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista));
+		m_Flags.NeedsClippedFloat = GetSysInfo().IsOriginal();
 	} else if(m_HostApiType == paDirectSound)
 	{
-		m_Flags.NeedsClippedFloat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista));
+		m_Flags.NeedsClippedFloat = GetSysInfo().IsOriginal();
 	} else
 	{
 		m_Flags.NeedsClippedFloat = false;
Index: sounddev/SoundDeviceUtilities.cpp
===================================================================
--- sounddev/SoundDeviceUtilities.cpp	(revision 11181)
+++ sounddev/SoundDeviceUtilities.cpp	(working copy)
@@ -19,6 +19,7 @@
 #include <algorithm>
 
 #if MPT_OS_WINDOWS
+#include <avrt.h>
 #include <mmsystem.h>
 #endif // MPT_OS_WINDOWS
 
@@ -131,41 +132,8 @@
 }
 
 
-MPT_REGISTERED_COMPONENT(ComponentAvRt, "AvRt")
-
-ComponentAvRt::ComponentAvRt()
-	: ComponentLibrary(ComponentTypeSystem)
-	, AvSetMmThreadCharacteristics(nullptr)
-	, AvRevertMmThreadCharacteristics(nullptr)
-{
-	return;
-}
-
-bool ComponentAvRt::DoInitialize()
-{
-	if(!mpt::Windows::Version::Current().IsAtLeast(mpt::Windows::Version::WinVista))
-	{
-		return false;
-	}
-	AddLibrary("avrt", mpt::LibraryPath::System(P_("avrt")));
-	MPT_COMPONENT_BINDWIN("avrt", AvSetMmThreadCharacteristics);
-	MPT_COMPONENT_BIND("avrt", AvRevertMmThreadCharacteristics);
-	if(HasBindFailed())
-	{
-		return false;
-	}
-	return true;
-}
-
-ComponentAvRt::~ComponentAvRt()
-{
-	return;
-}
-
-
-CPriorityBooster::CPriorityBooster(SoundDevice::SysInfo sysInfo, ComponentHandle<ComponentAvRt> & avrt, bool boostPriority, const mpt::winstring & priorityClass, int priority)
+CPriorityBooster::CPriorityBooster(SoundDevice::SysInfo sysInfo, bool boostPriority, const mpt::winstring & priorityClass, int priority)
 	: m_SysInfo(sysInfo)
-	, m_AvRt(avrt)
 	, m_BoostPriority(boostPriority)
 	, m_Priority(priority)
 	, task_idx(0)
@@ -178,16 +146,9 @@
 	#endif
 	if(m_BoostPriority)
 	{
-		if(m_SysInfo.WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista) && IsComponentAvailable(m_AvRt))
+		if(!priorityClass.empty())
 		{
-			if(!priorityClass.empty())
-			{
-				hTask = m_AvRt->AvSetMmThreadCharacteristics(priorityClass.c_str(), &task_idx);
-			}
-		} else
-		{
-			oldPriority = GetThreadPriority(GetCurrentThread());
-			SetThreadPriority(GetCurrentThread(), priority);
+			hTask = AvSetMmThreadCharacteristics(priorityClass.c_str(), &task_idx);
 		}
 	}
 }
@@ -198,18 +159,12 @@
 	MPT_TRACE_SCOPE();
 	if(m_BoostPriority)
 	{
-		if(m_SysInfo.WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista) && IsComponentAvailable(m_AvRt))
+		if(hTask)
 		{
-			if(hTask)
-			{
-				m_AvRt->AvRevertMmThreadCharacteristics(hTask);
-			}
-			hTask = NULL;
-			task_idx = 0;
-		} else
-		{
-			SetThreadPriority(GetCurrentThread(), oldPriority);
+			AvRevertMmThreadCharacteristics(hTask);
 		}
+		hTask = NULL;
+		task_idx = 0;
 	}
 }
 
@@ -324,7 +279,7 @@
 		if(!terminate)
 		{
 
-			CPriorityBooster priorityBooster(m_SoundDevice.GetSysInfo(), m_AvRt, m_SoundDevice.m_Settings.BoostThreadPriority, m_MMCSSClass, m_SoundDevice.m_AppInfo.BoostedThreadPriorityXP);
+			CPriorityBooster priorityBooster(m_SoundDevice.GetSysInfo(), m_SoundDevice.m_Settings.BoostThreadPriority, m_MMCSSClass, m_SoundDevice.m_AppInfo.BoostedThreadPriorityXP);
 			CPeriodicWaker periodicWaker(*this, m_WakeupInterval);
 
 			m_SoundDevice.StartFromSoundThread();
Index: sounddev/SoundDeviceUtilities.h
===================================================================
--- sounddev/SoundDeviceUtilities.h	(revision 11181)
+++ sounddev/SoundDeviceUtilities.h	(working copy)
@@ -16,7 +16,6 @@
 #include "SoundDeviceBase.h"
 
 #include "../common/misc_util.h"
-#include "../common/ComponentManager.h"
 
 #if MPT_OS_WINDOWS
 #include <mmreg.h>
@@ -48,27 +47,10 @@
 class CSoundDeviceWithThread;
 
 
-class ComponentAvRt
-	: public ComponentLibrary
-{
-	MPT_DECLARE_COMPONENT_MEMBERS
-public:
-	typedef HANDLE (WINAPI *pAvSetMmThreadCharacteristics)(LPCTSTR, LPDWORD);
-	typedef BOOL (WINAPI *pAvRevertMmThreadCharacteristics)(HANDLE);
-	pAvSetMmThreadCharacteristics AvSetMmThreadCharacteristics;
-	pAvRevertMmThreadCharacteristics AvRevertMmThreadCharacteristics;
-public:
-	ComponentAvRt();
-	virtual ~ComponentAvRt();
-	bool DoInitialize() override;
-};
-
-
 class CPriorityBooster
 {
 private:
 	SoundDevice::SysInfo m_SysInfo;
-	ComponentHandle<ComponentAvRt> & m_AvRt;
 	bool m_BoostPriority;
 	int m_Priority;
 	DWORD task_idx;
@@ -75,7 +57,7 @@
 	HANDLE hTask;
 	int oldPriority;
 public:
-	CPriorityBooster(SoundDevice::SysInfo sysInfo, ComponentHandle<ComponentAvRt> & avrt, bool boostPriority, const mpt::winstring & priorityClass, int priority);
+	CPriorityBooster(SoundDevice::SysInfo sysInfo, bool boostPriority, const mpt::winstring & priorityClass, int priority);
 	~CPriorityBooster();
 };
 
@@ -85,7 +67,6 @@
 	friend class CPeriodicWaker;
 private:
 	CSoundDeviceWithThread & m_SoundDevice;
-	ComponentHandle<ComponentAvRt> m_AvRt;
 	mpt::winstring m_MMCSSClass;
 	double m_WakeupInterval;
 	HANDLE m_hAudioWakeUp;
Index: sounddev/SoundDeviceWaveout.cpp
===================================================================
--- sounddev/SoundDeviceWaveout.cpp	(revision 11181)
+++ sounddev/SoundDeviceWaveout.cpp	(working copy)
@@ -207,7 +207,7 @@
 	}
 	SetWakeupEvent(m_ThreadWakeupEvent);
 	SetWakeupInterval(m_nWaveBufferSize * 1.0 / m_Settings.GetBytesPerSecond());
-	m_Flags.NeedsClippedFloat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::Windows::Version::WinVista));
+	m_Flags.NeedsClippedFloat = GetSysInfo().IsOriginal();
 	return true;
 }
 
