diff --git a/contrib/build_all_uwp.bat b/contrib/build_all_uwp.bat
new file mode 100644
index 0000000000000000000000000000000000000000..5fd9bfe630be14205bae5b458b192239410288d3
--- /dev/null
+++ b/contrib/build_all_uwp.bat
@@ -0,0 +1,94 @@
+@echo on
+SETLOCAL EnableDelayedExpansion
+
+set SRC=%~dp0
+
+set PATH=%PATH%;%ProgramFiles(x86)%\MSBuild\14.0\Bin\
+
+set MSBUILD_ARGS=/nologo /p:Configuration=Release /p:Platform=x64 /verbosity:normal /maxcpucount:%NUMBER_OF_PROCESSORS%
+
+set DEPENDENCIES=( ^
+build\boost\MSVC\random\random.vcxproj, ^
+build\boost\MSVC\system\system.vcxproj, ^
+build\jsoncpp\makefiles\msvc2010\lib_json.vcxproj, ^
+build\cryptopp\cryptlib.vcxproj, ^
+build\opendht\MSVC\argon.vcxproj, ^
+build\opendht\MSVC\blake.vcxproj, ^
+build\gmp\SMP\libgmp.vcxproj, ^
+build\nettle\SMP\libnettle.vcxproj, ^
+build\nettle\SMP\libhogweed.vcxproj, ^
+build\libiconv\SMP\libiconv.vcxproj, ^
+build\nettle\SMP\libiconv.vcxproj, ^
+build\zlib\SMP\libzlib.vcxproj, ^
+build\gnutls\SMP\libgnutls.vcxproj, ^
+build\msgpack-c\msgpack_vc8.vcxproj, ^
+build\opendht\MSVC\opendht.vcxproj, ^
+build\libsamplerate\MSVC\libsamplerate.vcxproj, ^
+build\pthreads\MSVC\pthreads-UWP-S\pthreads-UWP-S.vcxproj, ^
+build\libupnp\build\VS2015\ixml.vcxproj, ^
+build\libupnp\build\VS2015\threadutil.vcxproj, ^
+build\libupnp\build\VS2015\libupnp.vcxproj, ^
+build\pcre\MSVC\pcre.vcxproj, ^
+build\pjproject\third_party\build\baseclasses\libbaseclasses.vcxproj, ^
+build\pjproject\third_party\build\g7221\libg7221codec.vcxproj, ^
+build\pjproject\third_party\build\gsm\libgsmcodec.vcxproj, ^
+build\pjproject\third_party\build\ilbc\libilbccodec.vcxproj, ^
+build\pjproject\third_party\build\milenage\libmilenage.vcxproj, ^
+build\pjproject\third_party\build\resample\libresample.vcxproj, ^
+build\pjproject\third_party\build\speex\libspeex.vcxproj, ^
+build\pjproject\third_party\build\srtp\libsrtp.vcxproj, ^
+build\pjproject\third_party\build\yuv\libyuv.vcxproj, ^
+build\pjproject\pjlib-util\build\pjlib-util.vcxproj, ^
+build\pjproject\pjmedia\build\pjmedia.vcxproj, ^
+build\pjproject\pjmedia\build\pjmedia_audiodev.vcxproj, ^
+build\pjproject\pjmedia\build\pjmedia_codec.vcxproj, ^
+build\pjproject\pjmedia\build\pjmedia_videodev.vcxproj, ^
+build\pjproject\pjlib\build\pjlib.vcxproj, ^
+build\pjproject\pjsip\build\pjsip_core.vcxproj, ^
+build\pjproject\pjsip\build\pjsip_simple.vcxproj, ^
+build\pjproject\pjsip\build\pjsua_lib.vcxproj, ^
+build\pjproject\pjsip\build\pjsua2_lib.vcxproj, ^
+build\pjproject\pjsip\build\pjsip_ua.vcxproj, ^
+build\pjproject\pjnath\build\pjnath.vcxproj, ^
+build\pjproject\pjsip-apps\build\libpjproject.vcxproj, ^
+build\portaudio\MSVC\portaudio-UWP\portaudio-UWP.vcxproj, ^
+build\yaml-cpp\MSVC\yaml-cpp.vcxproj, ^
+)
+
+rem * build ffmpeg *
+cd build\FFmpegInterop
+SET LIB="%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x64;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x64"
+SET LIBPATH="%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64;"
+SET INCLUDE="%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;"
+set MSYS2_BIN="C:\msys64\usr\bin\bash.exe"
+call BuildFFmpeg.bat win10 x64
+cd ..\..
+
+rem * build openssl UWP*
+cd build\restbed\dependency\openssl
+call perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL
+call ms\do_winuniversal
+call ms\setVSvars universal10.0x64
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
+call nmake -f ms\ntdll.mak
+set PATH=restbed\dependency\openssl\out32dll;%PATH%
+
+rem * build restbed w/asio *
+cd ..\..
+mkdir build
+cd build
+cmake -G "Visual Studio 14 2015 Win64" ..
+cmake --build . --target ALL_BUILD --config Release
+cd ..\..
+
+rem * build the rest *
+for %%I in %DEPENDENCIES% do (
+    call :build "%SRC%%%I"
+)
+
+exit /B %ERRORLEVEL%
+
+:build
+echo "Building project: " %*
+msbuild %* %MSBUILD_ARGS%
+exit /B 0
\ No newline at end of file
diff --git a/contrib/src/boost/boost-uwp.patch b/contrib/src/boost/boost-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..9953f0a87dce7861a951dc08c121590f81564782
--- /dev/null
+++ b/contrib/src/boost/boost-uwp.patch
@@ -0,0 +1,612 @@
+--- /dev/null
++++ b/MSVC/boost.sln
+@@ -0,0 +1,48 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25420.1
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "system", "system\system.vcxproj", "{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "random", "random\random.vcxproj", "{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|ARM = Debug|ARM
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		Release|ARM = Release|ARM
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|ARM.ActiveCfg = Debug|ARM
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|ARM.Build.0 = Debug|ARM
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|x64.ActiveCfg = Debug|x64
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|x64.Build.0 = Debug|x64
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|x86.ActiveCfg = Debug|Win32
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Debug|x86.Build.0 = Debug|Win32
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|ARM.ActiveCfg = Release|ARM
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|ARM.Build.0 = Release|ARM
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|x64.ActiveCfg = Release|x64
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|x64.Build.0 = Release|x64
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|x86.ActiveCfg = Release|Win32
++		{A02FD1CC-618B-428D-AC46-91A2A12D0DCD}.Release|x86.Build.0 = Release|Win32
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|ARM.ActiveCfg = Debug|ARM
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|ARM.Build.0 = Debug|ARM
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|x64.ActiveCfg = Debug|x64
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|x64.Build.0 = Debug|x64
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|x86.ActiveCfg = Debug|Win32
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Debug|x86.Build.0 = Debug|Win32
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|ARM.ActiveCfg = Release|ARM
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|ARM.Build.0 = Release|ARM
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|x64.ActiveCfg = Release|x64
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|x64.Build.0 = Release|x64
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|x86.ActiveCfg = Release|Win32
++		{039AC2C4-C1BE-4B3F-BC4A-4541B2066293}.Release|x86.Build.0 = Release|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/boost.vcxproj
+@@ -0,0 +1,117 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{CE7BD1A1-3856-4D2E-BA98-B940E30EB13B}</ProjectGuid>
++    <RootNamespace>boost</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>Application</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>Application</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>Application</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>Application</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup />
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>Disabled</Optimization>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>Disabled</Optimization>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>MaxSpeed</Optimization>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <OptimizeReferences>true</OptimizeReferences>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>MaxSpeed</Optimization>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <OptimizeReferences>true</OptimizeReferences>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/random/random.vcxproj
+@@ -0,0 +1,209 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|ARM">
++      <Configuration>Debug</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|ARM">
++      <Configuration>Release</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\libs\random\src\random_device.cpp" />
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{039ac2c4-c1be-4b3f-bc4a-4541b2066293}</ProjectGuid>
++    <Keyword>StaticLibrary</Keyword>
++    <RootNamespace>random</RootNamespace>
++    <DefaultLanguage>en-US</DefaultLanguage>
++    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
++    <AppContainerApplication>true</AppContainerApplication>
++    <ApplicationType>Windows Store</ApplicationType>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformMinVersion>10.0.10586.0</WindowsTargetPlatformMinVersion>
++    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <GenerateManifest>false</GenerateManifest>
++    <TargetName>boost_random</TargetName>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>true</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>BOOST_ALL_NO_LIB;BOOST_RANDOM_WINDOWS_RUNTIME;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++xcopy /S /Y $(OutDir)boost_random.lib $(ProjectDir)..\..\..\lib\x64</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/system/system.vcxproj
+@@ -0,0 +1,209 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|ARM">
++      <Configuration>Debug</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|ARM">
++      <Configuration>Release</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\libs\system\src\error_code.cpp" />
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{a02fd1cc-618b-428d-ac46-91a2a12d0dcd}</ProjectGuid>
++    <Keyword>StaticLibrary</Keyword>
++    <RootNamespace>system</RootNamespace>
++    <DefaultLanguage>en-US</DefaultLanguage>
++    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
++    <AppContainerApplication>true</AppContainerApplication>
++    <ApplicationType>Windows Store</ApplicationType>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformMinVersion>10.0.10586.0</WindowsTargetPlatformMinVersion>
++    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <GenerateManifest>false</GenerateManifest>
++    <TargetName>boost_system</TargetName>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>BOOST_ALL_NO_LIB;BOOST_RANDOM_WINDOWS_RUNTIME;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++xcopy /S /Y $(OutDir)boost_system.lib $(ProjectDir)..\..\..\lib\x64</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- a/boost/config.hpp
++++ b/boost/config.hpp
+@@ -17,6 +17,8 @@
+ #ifndef BOOST_CONFIG_HPP
+ #define BOOST_CONFIG_HPP
+ 
++#define BOOST_ALL_NO_LIB
++
+ // if we don't have a user config, then use the default location:
+ #if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
+ #  define BOOST_USER_CONFIG <boost/config/user.hpp>
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/boost/fetch_and_patch.bat b/contrib/src/boost/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..723d61fd1ef6a6d2b9bb7814768645d4b66deb77
--- /dev/null
+++ b/contrib/src/boost/fetch_and_patch.bat
@@ -0,0 +1,17 @@
+set BUILD=%SRC%..\build
+
+set BOOST_VERSION_1=1.61.0
+set BOOST_VERSION_2=1_61_0
+set BOOST_URL="https://sourceforge.net/projects/boost/files/boost/%BOOST_VERSION_1%/boost_%BOOST_VERSION_2%.zip"
+
+mkdir %BUILD%
+wget %BOOST_URL%
+unzip -q boost_%BOOST_VERSION_2%.zip -d %BUILD%
+del boost_%BOOST_VERSION_2%.zip
+rename %BUILD%\boost_%BOOST_VERSION_2% boost
+
+cd %BUILD%\boost
+
+git apply --reject --whitespace=fix %SRC%\boost\boost-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/cryptopp/cryptopp-uwp.patch b/contrib/src/cryptopp/cryptopp-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..91fdbe714fd8d963be618735c960ce946e96ebb8
--- /dev/null
+++ b/contrib/src/cryptopp/cryptopp-uwp.patch
@@ -0,0 +1,1644 @@
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,3 +1,6 @@
++# Visual Studio
++*.VC.db
++
+ ####################
+ ## Crypto++ specific
+ ####################
+@@ -268,4 +271,4 @@ pip-log.txt
+ *.local
+ 
+ # Dependency file
+-*.d
++*.d
+\ No newline at end of file
+--- a/cryptlib.vcxproj
++++ b/cryptlib.vcxproj
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="utf-8"?>
+-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup Label="ProjectConfigurations">
+     <ProjectConfiguration Include="Debug|Win32">
+       <Configuration>Debug</Configuration>
+@@ -37,59 +37,67 @@
+   <PropertyGroup Label="Globals">
+     <ProjectGuid>{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}</ProjectGuid>
+     <RootNamespace>cryptlib</RootNamespace>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <UseOfMfc>false</UseOfMfc>
+     <CharacterSet>MultiByte</CharacterSet>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+   <ImportGroup Label="ExtensionSettings">
+-    <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
+   </ImportGroup>
+   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'" Label="PropertySheets">
+     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+@@ -117,23 +125,39 @@
+   </ImportGroup>
+   <PropertyGroup Label="UserMacros" />
+   <PropertyGroup>
+-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\Output\$(Configuration)\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\Output\$(Configuration)\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">$(Platform)\DLL_Output\Release\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">$(Platform)\DLL_Output\Release\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\Output\$(Configuration)\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\Output\$(Configuration)\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">$(Platform)\DLL_Output\Debug\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">$(Platform)\DLL_Output\Debug\</OutDir>
+-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++    <_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <OutDir>$(Platform)\Output\$(Configuration)\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)$(Platform)\Output\$(Configuration)\</OutDir>
++    <IntDir>$(ProjectDir)$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">
++    <OutDir>$(Platform)\DLL_Output\Release\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">
++    <OutDir>$(Platform)\DLL_Output\Release\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <OutDir>$(Platform)\Output\$(Configuration)\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(Platform)\Output\$(Configuration)\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">
++    <OutDir>$(Platform)\DLL_Output\Debug\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">
++    <OutDir>$(Platform)\DLL_Output\Debug\</OutDir>
++    <IntDir>$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+   </PropertyGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+     <ClCompile>
+@@ -147,7 +171,7 @@
+       <FunctionLevelLinking>true</FunctionLevelLinking>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -167,11 +191,11 @@
+       <OmitFramePointers>true</OmitFramePointers>
+       <PreprocessorDefinitions>NDEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <StringPooling>true</StringPooling>
+-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+       <FunctionLevelLinking>true</FunctionLevelLinking>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -182,6 +206,11 @@
+     <Lib>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+     </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\lib
++mkdir $(ProjectDir)..\lib\x64
++copy $(OutDir)cryptlib.lib $(ProjectDir)..\lib\x64</Command>
++    </PostBuildEvent>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">
+     <ClCompile>
+@@ -195,7 +224,7 @@
+       <FunctionLevelLinking>true</FunctionLevelLinking>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -219,7 +248,7 @@
+       <FunctionLevelLinking>true</FunctionLevelLinking>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -240,7 +269,7 @@
+       <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -260,7 +289,7 @@
+       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -280,7 +309,7 @@
+       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -300,7 +329,7 @@
+       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+       <PrecompiledHeader>Use</PrecompiledHeader>
+       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+-      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
++      <ProgramDataBaseFileName>$(OutDir)vc80.pdb</ProgramDataBaseFileName>
+       <WarningLevel>Level4</WarningLevel>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -313,47 +342,228 @@
+     </Lib>
+   </ItemDefinitionGroup>
+   <ItemGroup>
+-    <ClCompile Include="3way.cpp" />
+-    <ClCompile Include="adler32.cpp" />
+-    <ClCompile Include="algebra.cpp" />
+-    <ClCompile Include="algparam.cpp" />
+-    <ClCompile Include="arc4.cpp" />
+-    <ClCompile Include="asn.cpp" />
++    <ClCompile Include="3way.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="adler32.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="algebra.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="algparam.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="arc4.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="asn.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="authenc.cpp" />
+-    <ClCompile Include="base32.cpp" />
+-    <ClCompile Include="base64.cpp" />
+-    <ClCompile Include="basecode.cpp" />
+-    <ClCompile Include="bfinit.cpp" />
+-    <ClCompile Include="blake2.cpp" />
+-    <ClCompile Include="blowfish.cpp" />
+-    <ClCompile Include="blumshub.cpp" />
+-    <ClCompile Include="camellia.cpp" />
+-    <ClCompile Include="cast.cpp" />
+-    <ClCompile Include="casts.cpp" />
+-    <ClCompile Include="cbcmac.cpp" />
++    <ClCompile Include="base32.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="base64.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="basecode.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="bfinit.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="blake2.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="blowfish.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="blumshub.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="camellia.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="cast.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="casts.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="cbcmac.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="ccm.cpp" />
+     <ClCompile Include="chacha.cpp" />
+-    <ClCompile Include="channels.cpp" />
++    <ClCompile Include="channels.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="cmac.cpp" />
+     <ClCompile Include="cpu.cpp" />
+-    <ClCompile Include="crc.cpp" />
+-    <ClCompile Include="cryptlib.cpp" />
+-    <ClCompile Include="default.cpp" />
+-    <ClCompile Include="des.cpp" />
+-    <ClCompile Include="dessp.cpp" />
+-    <ClCompile Include="dh.cpp" />
+-    <ClCompile Include="dh2.cpp" />
++    <ClCompile Include="crc.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="cryptlib.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="default.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="des.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="dessp.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="dh.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="dh2.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="dll.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+       </PrecompiledHeader>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+@@ -361,64 +571,228 @@
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+       </PrecompiledHeader>
+     </ClCompile>
+-    <ClCompile Include="dsa.cpp" />
++    <ClCompile Include="dsa.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="eax.cpp" />
+-    <ClCompile Include="ec2n.cpp" />
++    <ClCompile Include="ec2n.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="eccrypto.cpp">
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+     </ClCompile>
+-    <ClCompile Include="ecp.cpp" />
+-    <ClCompile Include="elgamal.cpp" />
++    <ClCompile Include="ecp.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="elgamal.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="emsa2.cpp" />
+     <ClCompile Include="eprecomp.cpp">
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+     </ClCompile>
+-    <ClCompile Include="esign.cpp" />
+-    <ClCompile Include="files.cpp" />
+-    <ClCompile Include="filters.cpp" />
+-    <ClCompile Include="fips140.cpp" />
+-    <ClCompile Include="fipstest.cpp" />
++    <ClCompile Include="esign.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="files.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="filters.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="fips140.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="fipstest.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="gcm.cpp" />
+-    <ClCompile Include="gf256.cpp" />
+-    <ClCompile Include="gf2_32.cpp" />
+-    <ClCompile Include="gf2n.cpp" />
+-    <ClCompile Include="gfpcrypt.cpp" />
+-    <ClCompile Include="gost.cpp" />
+-    <ClCompile Include="gzip.cpp" />
+-    <ClCompile Include="hex.cpp" />
+-    <ClCompile Include="hmac.cpp" />
+-    <ClCompile Include="hrtimer.cpp" />
+-    <ClCompile Include="ida.cpp" />
+-    <ClCompile Include="idea.cpp" />
++    <ClCompile Include="gf256.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="gf2n.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="gf2_32.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="gfpcrypt.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="gost.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="gzip.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="hex.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="hmac.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="hrtimer.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="ida.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="idea.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="integer.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <AssemblerListingLocation Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+       </AssemblerListingLocation>
+     </ClCompile>
+     <ClCompile Include="iterhash.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+       </PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+       </PrecompiledHeader>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+@@ -426,83 +800,523 @@
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+       </PrecompiledHeader>
+     </ClCompile>
+-    <ClCompile Include="keccak.cpp" />
+-    <ClCompile Include="luc.cpp" />
+-    <ClCompile Include="mars.cpp" />
+-    <ClCompile Include="marss.cpp" />
+-    <ClCompile Include="md2.cpp" />
+-    <ClCompile Include="md4.cpp" />
+-    <ClCompile Include="md5.cpp" />
+-    <ClCompile Include="misc.cpp" />
+-    <ClCompile Include="modes.cpp" />
+-    <ClCompile Include="mqueue.cpp" />
+-    <ClCompile Include="mqv.cpp" />
+-    <ClCompile Include="nbtheory.cpp" />
+-    <ClCompile Include="network.cpp" />
+-    <ClCompile Include="oaep.cpp" />
+-    <ClCompile Include="osrng.cpp" />
+-    <ClCompile Include="panama.cpp" />
++    <ClCompile Include="keccak.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="luc.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="mars.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="marss.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="md2.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="md4.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="md5.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="misc.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="modes.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="mqueue.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="mqv.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="nbtheory.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="network.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="oaep.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="osrng.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="panama.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="pch.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Create</PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Create</PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">Create</PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">Create</PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+     </ClCompile>
+-    <ClCompile Include="pkcspad.cpp" />
+-    <ClCompile Include="polynomi.cpp" />
+-    <ClCompile Include="pssr.cpp" />
+-    <ClCompile Include="pubkey.cpp" />
+-    <ClCompile Include="queue.cpp" />
+-    <ClCompile Include="rabin.cpp" />
+-    <ClCompile Include="randpool.cpp" />
+-    <ClCompile Include="rc2.cpp" />
+-    <ClCompile Include="rc5.cpp" />
+-    <ClCompile Include="rc6.cpp" />
+-    <ClCompile Include="rdrand.cpp" />
+-    <ClCompile Include="rdtables.cpp" />
+-    <ClCompile Include="rijndael.cpp" />
+-    <ClCompile Include="ripemd.cpp" />
+-    <ClCompile Include="rng.cpp" />
+-    <ClCompile Include="rsa.cpp" />
+-    <ClCompile Include="rw.cpp" />
+-    <ClCompile Include="safer.cpp" />
++    <ClCompile Include="pkcspad.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="polynomi.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="pssr.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="pubkey.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="queue.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rabin.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="randpool.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rc2.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rc5.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rc6.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rdrand.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rdtables.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rijndael.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="ripemd.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rng.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rsa.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="rw.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="safer.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="salsa.cpp" />
+-    <ClCompile Include="seal.cpp" />
++    <ClCompile Include="seal.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="seed.cpp" />
+-    <ClCompile Include="serpent.cpp" />
+-    <ClCompile Include="sha.cpp" />
++    <ClCompile Include="serpent.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="sha.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="sha3.cpp" />
+-    <ClCompile Include="shacal2.cpp" />
+-    <ClCompile Include="shark.cpp" />
+-    <ClCompile Include="sharkbox.cpp" />
+-    <ClCompile Include="simple.cpp" />
+-    <ClCompile Include="skipjack.cpp" />
+-    <ClCompile Include="socketft.cpp" />
++    <ClCompile Include="shacal2.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="shark.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="sharkbox.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="simple.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="skipjack.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="socketft.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="sosemanuk.cpp" />
+-    <ClCompile Include="square.cpp" />
+-    <ClCompile Include="squaretb.cpp" />
+-    <ClCompile Include="strciphr.cpp" />
+-    <ClCompile Include="tea.cpp" />
+-    <ClCompile Include="tftables.cpp" />
+-    <ClCompile Include="tiger.cpp" />
+-    <ClCompile Include="tigertab.cpp" />
+-    <ClCompile Include="trdlocal.cpp" />
+-    <ClCompile Include="ttmac.cpp" />
+-    <ClCompile Include="twofish.cpp" />
++    <ClCompile Include="square.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="squaretb.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="strciphr.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="tea.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="tftables.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="tiger.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="tigertab.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="trdlocal.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="ttmac.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="twofish.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+     <ClCompile Include="vmac.cpp" />
+-    <ClCompile Include="wait.cpp" />
+-    <ClCompile Include="wake.cpp" />
+-    <ClCompile Include="whrlpool.cpp" />
+-    <ClCompile Include="winpipes.cpp" />
+-    <ClCompile Include="xtr.cpp" />
+-    <ClCompile Include="xtrcrypt.cpp" />
+-    <ClCompile Include="zdeflate.cpp" />
+-    <ClCompile Include="zinflate.cpp" />
+-    <ClCompile Include="zlib.cpp" />
++    <ClCompile Include="wait.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="wake.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="whrlpool.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="winpipes.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="xtr.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="xtrcrypt.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="zdeflate.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="zinflate.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
++    <ClCompile Include="zlib.cpp">
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">MaxSpeed</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
++      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
++    </ClCompile>
+   </ItemGroup>
+   <ItemGroup>
+     <CustomBuild Include="adhoc.cpp.proto">
+@@ -541,24 +1355,59 @@ echo: &gt;&gt; adhoc.cpp.copied
+     </CustomBuild>
+     <None Include="Doxyfile" />
+     <None Include="GNUmakefile" />
+-    <None Include="License.txt" />
+-    <None Include="Readme.txt" />
+-  </ItemGroup>
+-  <ItemGroup>
+     <CustomBuild Include="rdrand.asm">
+-      <Message>Building and assembling rdrand.asm</Message>
+-      <Command Condition="'$(Platform)'=='Win32'">ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" /Zi "%(FullPath)"</Command>
+-      <Outputs Condition="'$(Platform)'=='Win32'">$(IntDir)rdrand-x86.obj</Outputs>
+-      <Command Condition="'$(Platform)'=='x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" /Zi "%(FullPath)"</Command>
+-      <Outputs Condition="'$(Platform)'=='x64'">$(IntDir)rdrand-x64.obj</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">$(IntDir)rdrand-x86.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">$(IntDir)rdrand-x64.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">$(IntDir)rdrand-x86.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">$(IntDir)rdrand-x64.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)rdrand-x86.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)rdrand-x64.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)rdrand-x86.obj;%(Outputs)</Outputs>
++      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building and assembling rdrand.asm</Message>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)rdrand-x64.obj;%(Outputs)</Outputs>
+     </CustomBuild>
+     <CustomBuild Include="x64dll.asm">
+-      <Message Condition="'$(Configuration)'=='Debug'">Building and assembling x64dll.asm</Message>
+-      <Message Condition="'$(Configuration)'=='Release'">Building and assembling x64dll.asm</Message>
+-      <ExcludedFromBuild Condition="'$(Configuration)'=='DLL-Import Debug'">true</ExcludedFromBuild>
+-      <ExcludedFromBuild Condition="'$(Configuration)'=='DLL-Import Release'">true</ExcludedFromBuild>
+-      <Command Condition="'$(Platform)'=='x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"</Command>
+-      <Outputs Condition="'$(Platform)'=='x64'">$(IntDir)x64dll.obj</Outputs>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">true</ExcludedFromBuild>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|x64'">$(IntDir)x64dll.obj;%(Outputs)</Outputs>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|Win32'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">true</ExcludedFromBuild>
++      <Command Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='DLL-Import Release|x64'">$(IntDir)x64dll.obj;%(Outputs)</Outputs>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)x64dll.obj;%(Outputs)</Outputs>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
++      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)"
++</Command>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)x64dll.obj;%(Outputs)</Outputs>
+     </CustomBuild>
+     <CustomBuild Include="x64masm.asm">
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL-Import Debug|Win32'">true</ExcludedFromBuild>
+@@ -572,12 +1421,11 @@ echo: &gt;&gt; adhoc.cpp.copied
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+       <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)"
+ </Command>
+-      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)x64masm.obj</Outputs>
++      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)x64masm.obj;%(Outputs)</Outputs>
+       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+       <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)"
+ </Command>
+       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)x64masm.obj;%(Outputs)</Outputs>
+-      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building and Assembling x64masm.asm</Message>
+     </CustomBuild>
+   </ItemGroup>
+   <ItemGroup>
+@@ -621,15 +1469,15 @@ echo: &gt;&gt; adhoc.cpp.copied
+     <ClInclude Include="emsa2.h" />
+     <ClInclude Include="eprecomp.h" />
+     <ClInclude Include="esign.h" />
++    <ClInclude Include="fhmqv.h" />
+     <ClInclude Include="files.h" />
+     <ClInclude Include="filters.h" />
+     <ClInclude Include="fips140.h" />
+-    <ClInclude Include="fhmqv.h" />
+     <ClInclude Include="fltrimpl.h" />
+     <ClInclude Include="gcm.h" />
+     <ClInclude Include="gf256.h" />
+-    <ClInclude Include="gf2_32.h" />
+     <ClInclude Include="gf2n.h" />
++    <ClInclude Include="gf2_32.h" />
+     <ClInclude Include="gfpcrypt.h" />
+     <ClInclude Include="gost.h" />
+     <ClInclude Include="gzip.h" />
+@@ -702,7 +1550,6 @@ echo: &gt;&gt; adhoc.cpp.copied
+     <ClInclude Include="strciphr.h" />
+     <ClInclude Include="tea.h" />
+     <ClInclude Include="tiger.h" />
+-    <ClInclude Include="trap.h" />
+     <ClInclude Include="trdlocal.h" />
+     <ClInclude Include="trunhash.h" />
+     <ClInclude Include="ttmac.h" />
+@@ -719,8 +1566,11 @@ echo: &gt;&gt; adhoc.cpp.copied
+     <ClInclude Include="zinflate.h" />
+     <ClInclude Include="zlib.h" />
+   </ItemGroup>
++  <ItemGroup>
++    <Text Include="License.txt" />
++    <Text Include="Readme.txt" />
++  </ItemGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+   <ImportGroup Label="ExtensionTargets">
+-    <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
+   </ImportGroup>
+-</Project>
++</Project>
+\ No newline at end of file
+--- a/hrtimer.cpp
++++ b/hrtimer.cpp
+@@ -121,7 +121,7 @@ TimerWord Timer::TicksPerSecond()
+ TimerWord ThreadUserTimer::GetCurrentTimerValue()
+ {
+ #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(THREAD_TIMER_AVAILABLE)
+-	static bool getCurrentThreadImplemented = true;
++	/*static bool getCurrentThreadImplemented = true;
+ 	if (getCurrentThreadImplemented)
+ 	{
+ 		FILETIME now, ignored;
+@@ -137,14 +137,14 @@ TimerWord ThreadUserTimer::GetCurrentTimerValue()
+ 		}
+ 		return now.dwLowDateTime + ((TimerWord)now.dwHighDateTime << 32);
+ 	}
+-GetCurrentThreadNotImplemented:
++GetCurrentThreadNotImplemented:*/
+ 	return (TimerWord)clock() * (10*1000*1000 / CLOCKS_PER_SEC);
+ #elif defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(THREAD_TIMER_AVAILABLE)
+ 	LARGE_INTEGER now;
+ 	if (!QueryPerformanceCounter(&now))
+ 	{
+ 		const DWORD lastError = GetLastError();
+-		throw Exception(Exception::OTHER_ERROR, "ThreadUserTimer: QueryPerformanceCounter failed with error " + IntToString(lastError));
++		throw Exception(Exception::OTHER_ERROR, "ThreadUserTimer: QueryPerformanceCounter failed with error " + IntToString(lastError));		
+ 	}
+ 	return now.QuadPart;
+ #elif defined(CRYPTOPP_UNIX_AVAILABLE)
+--- a/wait.cpp
++++ b/wait.cpp
+@@ -63,7 +63,7 @@ void WaitObjectContainer::Clear()
+ # ifdef CRYPTOPP_MSAN
+ 	__msan_unpoison(&m_readfds, sizeof(m_readfds));
+ 	__msan_unpoison(&m_writefds, sizeof(m_writefds));
+-# endif
++# endif	
+ #endif
+ 	m_noWait = false;
+ 	m_firstEventTime = 0;
+@@ -137,7 +137,7 @@ WaitObjectContainer::~WaitObjectContainer()
+ 		if (!m_threads.empty())
+ 		{
+ 			HANDLE threadHandles[MAXIMUM_WAIT_OBJECTS] = {0};
+-
++			
+ 			unsigned int i;
+ 			for (i=0; i<m_threads.size(); i++)
+ 			{
+@@ -151,36 +151,36 @@ WaitObjectContainer::~WaitObjectContainer()
+ 				threadHandles[i] = thread.threadHandle;
+ 			}
+ 
+-			BOOL bResult = PulseEvent(m_startWaiting);
+-			CRYPTOPP_ASSERT(bResult != 0); CRYPTOPP_UNUSED(bResult);
+-
++			BOOL bResult = false;//PulseEvent(m_startWaiting);
++			CRYPTOPP_ASSERT(bResult != 0); CRYPTOPP_UNUSED(bResult);
++	
+ 			// Enterprise Analysis warning
+ #if defined(USE_WINDOWS8_API)
+ 			DWORD dwResult = ::WaitForMultipleObjectsEx((DWORD)m_threads.size(), threadHandles, TRUE, INFINITE, FALSE);
+-			CRYPTOPP_ASSERT((dwResult >= WAIT_OBJECT_0) && (dwResult < (DWORD)m_threads.size()));
++			CRYPTOPP_ASSERT((dwResult >= WAIT_OBJECT_0) && (dwResult < (DWORD)m_threads.size()));
+ #else
+ 			DWORD dwResult = ::WaitForMultipleObjects((DWORD)m_threads.size(), threadHandles, TRUE, INFINITE);
+-			CRYPTOPP_ASSERT((dwResult >= WAIT_OBJECT_0) && (dwResult < (DWORD)m_threads.size()));
++			CRYPTOPP_ASSERT((dwResult >= WAIT_OBJECT_0) && (dwResult < (DWORD)m_threads.size()));
+ #endif
+ 
+ 			for (i=0; i<m_threads.size(); i++)
+ 			{
+ 				// Enterprise Analysis warning
+ 				if (!threadHandles[i]) continue;
+-
++									
+ 				bResult = CloseHandle(threadHandles[i]);
+-				CRYPTOPP_ASSERT(bResult != 0);
++				CRYPTOPP_ASSERT(bResult != 0);
+ 			}
+ 
+ 			bResult = CloseHandle(m_startWaiting);
+-			CRYPTOPP_ASSERT(bResult != 0);
++			CRYPTOPP_ASSERT(bResult != 0);
+ 			bResult = CloseHandle(m_stopWaiting);
+-			CRYPTOPP_ASSERT(bResult != 0);
++			CRYPTOPP_ASSERT(bResult != 0);
+ 		}
+ 	}
+ 	catch (const Exception&)
+ 	{
+-		CRYPTOPP_ASSERT(0);
++		CRYPTOPP_ASSERT(0);
+ 	}
+ }
+ 
+@@ -201,12 +201,12 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
+ 		thread.waitingToWait = true;
+ #if defined(USE_WINDOWS8_API)
+ 		DWORD result = ::WaitForSingleObjectEx(thread.startWaiting, INFINITE, FALSE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #else
+ 		DWORD result = ::WaitForSingleObject(thread.startWaiting, INFINITE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #endif
+-
++		
+ 		thread.waitingToWait = false;
+ 		if (thread.terminate)
+ 			break;
+@@ -219,10 +219,10 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
+ 
+ #if defined(USE_WINDOWS8_API)
+ 		result = ::WaitForMultipleObjectsEx((DWORD)handles.size(), &handles[0], FALSE, INFINITE, FALSE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #else
+ 		result = ::WaitForMultipleObjects((DWORD)handles.size(), &handles[0], FALSE, INFINITE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #endif
+ 
+ 		if (result == WAIT_OBJECT_0)
+@@ -230,7 +230,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
+ 		SetEvent(thread.stopWaiting);
+ 		if (!(result > WAIT_OBJECT_0 && result < WAIT_OBJECT_0 + handles.size()))
+ 		{
+-			CRYPTOPP_ASSERT(!"error in WaitingThread");	// break here so we can see which thread has an error
++			CRYPTOPP_ASSERT(!"error in WaitingThread");	// break here so we can see which thread has an error
+ 			*thread.error = ::GetLastError();
+ 		}
+ 	}
+@@ -254,7 +254,7 @@ void WaitObjectContainer::CreateThreads(unsigned int count)
+ 		{
+ 			// Enterprise Analysis warning
+ 			if(!m_threads[i]) continue;
+-
++	
+ 			m_threads[i] = new WaitingThreadData;
+ 			WaitingThreadData &thread = *m_threads[i];
+ 			thread.terminate = false;
+@@ -304,7 +304,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
+ 			throw Err("WaitObjectContainer: number of wait objects exceeds limit");
+ 		CreateThreads(nThreads);
+ 		DWORD error = S_OK;
+-
++		
+ 		for (unsigned int i=0; i<m_threads.size(); i++)
+ 		{
+ 			// Enterprise Analysis warning
+@@ -324,14 +324,14 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
+ 		}
+ 
+ 		ResetEvent(m_stopWaiting);
+-		PulseEvent(m_startWaiting);
++		//PulseEvent(m_startWaiting);
+ 
+ #if defined(USE_WINDOWS8_API)
+ 		DWORD result = ::WaitForSingleObjectEx(m_stopWaiting, milliseconds, FALSE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #else
+ 		DWORD result = ::WaitForSingleObject(m_stopWaiting, milliseconds);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #endif
+ 
+ 		if (result == WAIT_OBJECT_0)
+@@ -359,10 +359,10 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
+ #endif
+ #if defined(USE_WINDOWS8_API)
+ 		DWORD result = ::WaitForMultipleObjectsEx((DWORD)m_handles.size(), &m_handles[0], FALSE, milliseconds, FALSE);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #else
+ 		DWORD result = ::WaitForMultipleObjects((DWORD)m_handles.size(), &m_handles[0], FALSE, milliseconds);
+-		CRYPTOPP_ASSERT(result != WAIT_FAILED);
++		CRYPTOPP_ASSERT(result != WAIT_FAILED);
+ #endif
+ #if TRACE_WAIT
+ 		if (milliseconds > 0)
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/cryptopp/fetch_and_patch.bat b/contrib/src/cryptopp/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..cbad5321b0f164858e790ce769e40a9cfa64f139
--- /dev/null
+++ b/contrib/src/cryptopp/fetch_and_patch.bat
@@ -0,0 +1,15 @@
+set BUILD=%SRC%..\build
+
+set CRYPTOPP_VERSION=54557b18275053bbfc34594f7e65808dd92dd1a6
+set CRYPTOPP_URL="https://github.com/weidai11/cryptopp.git"
+
+mkdir %BUILD%
+cd %BUILD%
+
+git clone %CRYPTOPP_URL%
+cd cryptopp
+git checkout %CRYPTOPP_VERSION%
+
+git apply --reject --whitespace=fix %SRC%\cryptopp\cryptopp-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/fetch_all_uwp.bat b/contrib/src/fetch_all_uwp.bat
index 7fb0a61bac5be8f2bfc38ec02a168f4733c87b96..5d76ffe07e23437666a76822e16ec09994c94006 100644
--- a/contrib/src/fetch_all_uwp.bat
+++ b/contrib/src/fetch_all_uwp.bat
@@ -4,13 +4,24 @@ SETLOCAL EnableDelayedExpansion
 set SRC=%~dp0
 
 set DEPENDENCIES=( ^
+boost, ^
+cryptopp, ^
+ffmpeg, ^
 gmp, ^
 gnutls, ^
 iconv, ^
-opendht, ^
+jsoncpp, ^
 msgpack, ^
 nettle, ^
-pjproject ^
+opendht, ^
+pcre, ^
+pjproject, ^
+portaudio, ^
+pthreads, ^
+restbed, ^
+samplerate, ^
+upnp, ^
+yaml-cpp, ^
 zlib ^
 )
 
diff --git a/contrib/src/ffmpeg/fetch_and_patch.bat b/contrib/src/ffmpeg/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..08167348c6fcb33b41dcb3bc8c562939b1b2b48c
--- /dev/null
+++ b/contrib/src/ffmpeg/fetch_and_patch.bat
@@ -0,0 +1,12 @@
+git clone --recursive 
+
+set BUILD=%SRC%..\build
+
+set FFMPEG_URL=git://github.com/Microsoft/FFmpegInterop.git
+
+mkdir %BUILD%
+cd %BUILD%
+
+git clone --recursive %FFMPEG_URL%
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/jsoncpp/fetch_and_patch.bat b/contrib/src/jsoncpp/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..9aa56ba1f8c888e6be3fbba8b8103dcc51e0516a
--- /dev/null
+++ b/contrib/src/jsoncpp/fetch_and_patch.bat
@@ -0,0 +1,13 @@
+set BUILD=%SRC%..\build
+
+set REPOURL="https://github.com/open-source-parsers/jsoncpp.git"
+
+mkdir %BUILD%
+cd %BUILD%
+
+git clone %REPOURL%
+cd jsoncpp
+
+git apply --reject --whitespace=fix %SRC%\jsoncpp\jsoncpp-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/jsoncpp/jsoncpp-uwp.patch b/contrib/src/jsoncpp/jsoncpp-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..51191e2e954edc570b7c321d7ce1484999975169
--- /dev/null
+++ b/contrib/src/jsoncpp/jsoncpp-uwp.patch
@@ -0,0 +1,147 @@
+--- a/makefiles/msvc2010/lib_json.vcxproj
++++ b/makefiles/msvc2010/lib_json.vcxproj
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="utf-8"?>
+-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup Label="ProjectConfigurations">
+     <ProjectConfiguration Include="Debug|Win32">
+       <Configuration>Debug</Configuration>
+@@ -32,29 +32,34 @@
+     <ProjectGuid>{1E6C2C1C-6453-4129-AE3F-0EE8E6599C89}</ProjectGuid>
+     <Keyword>Win32Proj</Keyword>
+     <RootNamespace>jsoncpp</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
+     <UseDebugLibraries>true</UseDebugLibraries>
+     <CharacterSet>Unicode</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
+     <UseDebugLibraries>true</UseDebugLibraries>
+     <CharacterSet>Unicode</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
+     <UseDebugLibraries>false</UseDebugLibraries>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+     <CharacterSet>Unicode</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+     <ConfigurationType>StaticLibrary</ConfigurationType>
+     <UseDebugLibraries>false</UseDebugLibraries>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+     <CharacterSet>Unicode</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+   <ImportGroup Label="ExtensionSettings">
+@@ -72,7 +77,15 @@
+     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+   </ImportGroup>
+   <PropertyGroup Label="UserMacros" />
+-  <PropertyGroup />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\MSVC\$(Platform)\$(Configuration)\</OutDir>
++  </PropertyGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+     <ClCompile>
+       <PrecompiledHeader>NotUsing</PrecompiledHeader>
+@@ -80,12 +93,19 @@
+       <Optimization>Disabled</Optimization>
+       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
+-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+     </ClCompile>
+     <Link>
+       <SubSystem>Windows</SubSystem>
+       <GenerateDebugInformation>true</GenerateDebugInformation>
+     </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++copy $(OutDir)lib_jsond.lib $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+     <ClCompile>
+@@ -100,6 +120,13 @@
+       <SubSystem>Windows</SubSystem>
+       <GenerateDebugInformation>true</GenerateDebugInformation>
+     </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x64
++copy $(OutDir)lib_jsond.lib $(SolutionDir)..\..\lib\x64
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+     <ClCompile>
+@@ -110,7 +137,8 @@
+       <IntrinsicFunctions>true</IntrinsicFunctions>
+       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
+-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
+     </ClCompile>
+     <Link>
+       <SubSystem>Windows</SubSystem>
+@@ -118,6 +146,13 @@
+       <EnableCOMDATFolding>true</EnableCOMDATFolding>
+       <OptimizeReferences>true</OptimizeReferences>
+     </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++copy $(OutDir)lib_json.lib $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
+   </ItemDefinitionGroup>
+   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+     <ClCompile>
+@@ -128,7 +163,8 @@
+       <IntrinsicFunctions>true</IntrinsicFunctions>
+       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories>
+-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
+     </ClCompile>
+     <Link>
+       <SubSystem>Windows</SubSystem>
+@@ -136,6 +172,13 @@
+       <EnableCOMDATFolding>true</EnableCOMDATFolding>
+       <OptimizeReferences>true</OptimizeReferences>
+     </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++copy $(OutDir)lib_json.lib $(ProjectDir)..\..\..\lib\x64
++mkdir $(ProjectDir)..\..\..\include
++xcopy /S /Y $(ProjectDir)..\..\include\*.h $(ProjectDir)..\..\..\include</Command>
++    </PostBuildEvent>
+   </ItemDefinitionGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+   <ImportGroup Label="ExtensionTargets">
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/pcre/fetch_and_patch.bat b/contrib/src/pcre/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..7b14469efcd1011d8cc887e6daa6767e26119eb1
--- /dev/null
+++ b/contrib/src/pcre/fetch_and_patch.bat
@@ -0,0 +1,21 @@
+set BUILD=%SRC%..\build
+
+set PCRE_VERSION=8.40
+set PCRE_URL=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
+set PCRE_NAME=pcre
+
+mkdir %BUILD%
+wget %PCRE_URL%/%PCRE_NAME%-%PCRE_VERSION%.zip
+unzip -q %PCRE_NAME%-%PCRE_VERSION%.zip -d %BUILD%
+del %PCRE_NAME%-%PCRE_VERSION%.zip
+rename %BUILD%\%PCRE_NAME%-%PCRE_VERSION% %PCRE_NAME%
+
+cd %BUILD%\%PCRE_NAME%
+
+git apply --reject --whitespace=fix %SRC%\%PCRE_NAME%\pcre-uwp.patch
+
+rename config.h.generic config.h
+rename pcre.h.in pcre.h
+rename pcre_chartables.c.dist pcre_chartables.c
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/pcre/pcre-uwp.patch b/contrib/src/pcre/pcre-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1a55e220a3d0324aefe1e1a7a33e09ee0db544c2
--- /dev/null
+++ b/contrib/src/pcre/pcre-uwp.patch
@@ -0,0 +1,451 @@
+--- /dev/null
++++ b/.gitignore
+@@ -0,0 +1,249 @@
++## Ignore Visual Studio temporary files, build results, and
++## files generated by popular Visual Studio add-ons.
++
++#output directories
++DebugLib/
++Debug/
++ReleaseLib/
++Release/
++.config/
++# User-specific files
++*.suo
++*.user
++*.userosscache
++*.sln.docstates
++*.VC.VC.opendb
++*.VC.db
++*.db
++*.filters
++
++# User-specific files (MonoDevelop/Xamarin Studio)
++*.userprefs
++
++# Build results
++[Dd]ebug/
++[Dd]ebugPublic/
++[Rr]elease/
++[Rr]eleases/
++x64/
++x86/
++bld/
++[Bb]in/
++[Oo]bj/
++
++# Visual Studio 2015 cache/options directory
++.vs/
++# Uncomment if you have tasks that create the project's static files in wwwroot
++#wwwroot/
++
++# MSTest test Results
++[Tt]est[Rr]esult*/
++[Bb]uild[Ll]og.*
++
++# NUNIT
++*.VisualState.xml
++TestResult.xml
++
++# Build Results of an ATL Project
++[Dd]ebugPS/
++[Rr]eleasePS/
++dlldata.c
++
++# DNX
++project.lock.json
++artifacts/
++
++#*_i.c
++#*_p.c
++#*_i.h
++*.ilk
++*.meta
++*.obj
++*.o
++*.pch
++*.pdb
++*.pgc
++*.pgd
++*.rsp
++*.sbr
++*.tlb
++*.tli
++*.tlh
++*.tmp
++*.tmp_proj
++*.log
++*.vspscc
++*.vssscc
++.builds
++*.pidb
++*.svclog
++*.scc
++
++# Chutzpah Test files
++_Chutzpah*
++
++# Visual C++ cache files
++ipch/
++*.aps
++*.ncb
++*.opendb
++*.opensdf
++*.sdf
++*.cachefile
++
++# Visual Studio profiler
++*.psess
++*.vsp
++*.vspx
++*.sap
++
++# TFS 2012 Local Workspace
++$tf/
++
++# Guidance Automation Toolkit
++*.gpState
++
++# ReSharper is a .NET coding add-in
++_ReSharper*/
++*.[Rr]e[Ss]harper
++*.DotSettings.user
++
++# JustCode is a .NET coding add-in
++.JustCode
++
++# TeamCity is a build add-in
++_TeamCity*
++
++# DotCover is a Code Coverage Tool
++*.dotCover
++
++# NCrunch
++_NCrunch_*
++.*crunch*.local.xml
++nCrunchTemp_*
++
++# MightyMoose
++*.mm.*
++AutoTest.Net/
++
++# Web workbench (sass)
++.sass-cache/
++
++# Installshield output folder
++[Ee]xpress/
++
++# DocProject is a documentation generator add-in
++DocProject/buildhelp/
++DocProject/Help/*.HxT
++DocProject/Help/*.HxC
++DocProject/Help/*.hhc
++DocProject/Help/*.hhk
++DocProject/Help/*.hhp
++DocProject/Help/Html2
++DocProject/Help/html
++
++# Click-Once directory
++publish/
++
++# Publish Web Output
++*.[Pp]ublish.xml
++*.azurePubxml
++# TODO: Comment the next line if you want to checkin your web deploy settings 
++# but database connection strings (with potential passwords) will be unencrypted
++*.pubxml
++*.publishproj
++
++# NuGet Packages
++*.nupkg
++# The packages folder can be ignored because of Package Restore
++**/packages/*
++# except build/, which is used as an MSBuild target.
++!**/packages/build/
++# Uncomment if necessary however generally it will be regenerated when needed
++#!**/packages/repositories.config
++# NuGet v3's project.json files produces more ignoreable files
++*.nuget.props
++*.nuget.targets
++
++# Microsoft Azure Build Output
++csx/
++*.build.csdef
++
++# Microsoft Azure Emulator
++ecf/
++rcf/
++
++# Microsoft Azure ApplicationInsights config file
++ApplicationInsights.config
++
++# Windows Store app package directory
++AppPackages/
++BundleArtifacts/
++
++# Visual Studio cache files
++# files ending in .cache can be ignored
++*.[Cc]ache
++# but keep track of directories ending in .cache
++!*.[Cc]ache/
++
++# Others
++ClientBin/
++~$*
++*~
++*.dbmdl
++*.dbproj.schemaview
++*.pfx
++*.publishsettings
++node_modules/
++orleans.codegen.cs
++
++# RIA/Silverlight projects
++Generated_Code/
++
++# Backup & report files from converting an old project file
++# to a newer Visual Studio version. Backup files are not needed,
++# because we have git ;-)
++_UpgradeReport_Files/
++Backup*/
++UpgradeLog*.XML
++UpgradeLog*.htm
++
++# SQL Server files
++*.mdf
++*.ldf
++
++# Business Intelligence projects
++*.rdl.data
++*.bim.layout
++*.bim_*.settings
++
++# Microsoft Fakes
++FakesAssemblies/
++
++# GhostDoc plugin setting file
++*.GhostDoc.xml
++
++# Node.js Tools for Visual Studio
++.ntvs_analysis.dat
++
++# Visual Studio 6 build log
++*.plg
++
++# Visual Studio 6 workspace options file
++*.opt
++
++# Visual Studio LightSwitch build output
++**/*.HTMLClient/GeneratedArtifacts
++**/*.DesktopClient/GeneratedArtifacts
++**/*.DesktopClient/ModelManifest.xml
++**/*.Server/GeneratedArtifacts
++**/*.Server/ModelManifest.xml
++_Pvt_Extensions
++
++# Paket dependency manager
++.paket/paket.exe
++
++# FAKE - F# Make
++.fake/
++
++!config.h
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/pcre.sln
+@@ -0,0 +1,28 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25123.0
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcre", "pcre.vcxproj", "{C00D492D-9474-4F78-80BF-86F6F337E81B}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Debug|x64.ActiveCfg = Debug|x64
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Debug|x64.Build.0 = Debug|x64
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Debug|x86.ActiveCfg = Debug|Win32
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Debug|x86.Build.0 = Debug|Win32
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Release|x64.ActiveCfg = Release|x64
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Release|x64.Build.0 = Release|x64
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Release|x86.ActiveCfg = Release|Win32
++		{C00D492D-9474-4F78-80BF-86F6F337E81B}.Release|x86.Build.0 = Release|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/pcre.vcxproj
+@@ -0,0 +1,160 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{C00D492D-9474-4F78-80BF-86F6F337E81B}</ProjectGuid>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <TargetExt>.lib</TargetExt>
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <TargetExt>.lib</TargetExt>
++    <OutDir>$(ProjectDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\include
++xcopy /S /Y $(ProjectDir)..\*.h $(ProjectDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClInclude Include="..\config.h" />
++    <ClInclude Include="..\pcre.h" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\pcre_byte_order.c" />
++    <ClCompile Include="..\pcre_chartables.c" />
++    <ClCompile Include="..\pcre_compile.c" />
++    <ClCompile Include="..\pcre_config.c" />
++    <ClCompile Include="..\pcre_dfa_exec.c" />
++    <ClCompile Include="..\pcre_exec.c" />
++    <ClCompile Include="..\pcre_fullinfo.c" />
++    <ClCompile Include="..\pcre_get.c" />
++    <ClCompile Include="..\pcre_globals.c" />
++    <ClCompile Include="..\pcre_jit_compile.c" />
++    <ClCompile Include="..\pcre_maketables.c" />
++    <ClCompile Include="..\pcre_newline.c" />
++    <ClCompile Include="..\pcre_ord2utf8.c" />
++    <ClCompile Include="..\pcre_refcount.c" />
++    <ClCompile Include="..\pcre_string_utils.c" />
++    <ClCompile Include="..\pcre_study.c" />
++    <ClCompile Include="..\pcre_tables.c" />
++    <ClCompile Include="..\pcre_ucd.c" />
++    <ClCompile Include="..\pcre_valid_utf8.c" />
++    <ClCompile Include="..\pcre_version.c" />
++    <ClCompile Include="..\pcre_xclass.c" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/pjproject/fetch_and_patch.bat b/contrib/src/pjproject/fetch_and_patch.bat
index 5d85775a3455fa2adeaa8d54120fcbcd5e2eb529..1fd1bf7fff59044f40e186ba720d6afe1de88721 100644
--- a/contrib/src/pjproject/fetch_and_patch.bat
+++ b/contrib/src/pjproject/fetch_and_patch.bat
@@ -2,25 +2,22 @@ set BUILD=%SRC%..\build
 
 mkdir %BUILD%
 wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.zip
-unzip pjproject-2.5.5.zip -d %BUILD%
+unzip -q pjproject-2.5.5.zip -d %BUILD%
 del pjproject-2.5.5.zip
 rename %BUILD%\pjproject-2.5.5 pjproject
 
 cd %BUILD%\pjproject
 
-git apply --reject --whitespace=fix %SRC%\pjproject\intptr_t.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\pj_win.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\endianness.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\gnutls.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\notestsapps.patch
+git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_endianness.patch
+git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_gnutls.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\ipv6.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\ice_config.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\multiple_listeners.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\fix_turn_fallback.patch
+git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_multiple_listeners.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\fix_ioqueue_ipv6_sendto.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\add_dtls_transport.patch
-git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_ice_sess.patch
+git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_fix_turn_fallback.patch
+git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp.patch
 git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_xbox_one.patch
 
 cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/pjproject/pj_uwp_endianness.patch b/contrib/src/pjproject/pj_uwp_endianness.patch
new file mode 100644
index 0000000000000000000000000000000000000000..886cb2d3f09b5c4d885d390055a1908ded2917a8
--- /dev/null
+++ b/contrib/src/pjproject/pj_uwp_endianness.patch
@@ -0,0 +1,17 @@
+--- a/pjlib/include/pj/config.h
++++ b/pjlib/include/pj/config.h
+@@ -245,7 +245,13 @@
+ #   define PJ_M_NAME		"armv4"
+ #   define PJ_HAS_PENTIUM	0
+ #   if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+-#   	error Endianness must be declared for this processor
++#       if defined(__GNUC__)
++#           include <endian.h>
++#           define PJ_IS_LITTLE_ENDIAN  __BYTE_ORDER__ == __LITTLE_ENDIAN__
++#           define PJ_IS_BIG_ENDIAN     __BYTE_ORDER__ == __BIG_ENDIAN__
++#       else
++#           error Endianness must be declared for this processor
++#       endif
+ #   endif
+ 
+ #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
diff --git a/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch b/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch
new file mode 100644
index 0000000000000000000000000000000000000000..fe386f024802d6b557153c0bc47f6e27fd331df6
--- /dev/null
+++ b/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch
@@ -0,0 +1,51 @@
+--- a/pjnath/src/pjnath/turn_session.c	2016-09-19 18:21:09.073614574 -0400
++++ b/pjnath/src/pjnath/turn_session.c	2016-09-19 18:21:30.648631620 -0400
+@@ -653,3 +653,3 @@
+ 
+-	cnt = PJ_TURN_MAX_DNS_SRV_CNT;
++	cnt = 1;
+ 	ai = (pj_addrinfo*)
+--- a/pjnath/src/pjnath/ice_strans.c
++++ b/pjnath/src/pjnath/ice_strans.c
+@@ -1996,6 +1996,38 @@ static void turn_on_state(pj_turn_sock *turn_sock, pj_turn_state_t old_state,
+ 				     sizeof(ipaddr), 3)));
+ 
+ 	sess_init_update(comp->ice_st);
++    } else if ((old_state == PJ_TURN_STATE_RESOLVING || old_state == PJ_TURN_STATE_ALLOCATING) &&
++               new_state >= PJ_TURN_STATE_DEALLOCATING)
++    {
++        pj_ice_sess_cand *cand = NULL;
++        unsigned i;
++
++        /* DNS resolution has failed! */
++        ++comp->turn[tp_idx].err_cnt;
++
++        /* Unregister ourself from the TURN relay */
++        pj_turn_sock_set_user_data(turn_sock, NULL);
++        comp->turn[tp_idx].sock = NULL;
++
++        /* Wait until initialization completes */
++        pj_grp_lock_acquire(comp->ice_st->grp_lock);
++
++        /* Find relayed candidate in the component */
++        for (i=0; i<comp->cand_cnt; ++i) {
++            if (comp->cand_list[i].type == PJ_ICE_CAND_TYPE_RELAYED &&
++                comp->cand_list[i].transport_id == data->transport_id)
++            {
++                cand = &comp->cand_list[i];
++                break;
++            }
++        }
++        pj_assert(cand != NULL);
++
++        pj_grp_lock_release(comp->ice_st->grp_lock);
++
++        cand->status = old_state == PJ_TURN_STATE_RESOLVING ? PJ_ERESOLVE : PJ_EINVALIDOP;
++
++        sess_init_update(comp->ice_st);
+ 
+     } else if (new_state >= PJ_TURN_STATE_DEALLOCATING) {
+ 	pj_turn_session_info info;
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/pjproject/pj_uwp_gnutls.patch b/contrib/src/pjproject/pj_uwp_gnutls.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d40e30a3ade80cbabfbed90c3f17c7644c58cb8d
--- /dev/null
+++ b/contrib/src/pjproject/pj_uwp_gnutls.patch
@@ -0,0 +1,3378 @@
+Copyright (c) 2014-2017 Savoir-faire Linux Inc.
+
+ssl_sock: add gnutls backend
+
+This backend is mutually exclusive with the OpenSSL one, but completely
+compatible, and conformant to the PJSIP API. Also avoids any license issues
+when linking statically.
+
+The configure script is updated to select either OpenSSL or GnuTLS
+with --enable-ssl[='...'] and a new symbol (PJ_HAS_TLS_SOCK) is introduced
+to identify which backend is in use.
+
+Written by
+Vittorio Giovara <vittorio.giovara@savoirfairelinux.com>
+Philippe Proulx <philippe.proulx@savoirfairelinux.com> and
+Adrien Béraud <adrien.beraud@savoirfairelinux.com>
+on behalf of Savoir-faire Linux.
+
+ .../aconfigure                                     |  184 +-
+ .../aconfigure.ac                                  |  101 +-
+ .../pjlib/build/Makefile                           |    3 +-
+ .../pjlib/include/pj/compat/os_auto.h.in           |    3 +
+ .../pjlib/include/pj/config.h                      |   14 +-
+ .../pjlib/include/pj/ssl_sock.h                    |    5 +
+ .../pjlib/src/pj/ssl_sock_common.c                 |    5 +
+ .../pjlib/src/pj/ssl_sock_gtls.c                   | 2887 ++++++++++++++++++++
+ .../pjlib/src/pj/ssl_sock_ossl.c                   |    6 +-
+ .../pjmedia/src/pjmedia/transport_srtp.c           |    6 +-
+ 10 files changed, 3147 insertions(+), 67 deletions(-)
+--- a/aconfigure
++++ b/aconfigure
+@@ -640,6 +640,8 @@ ac_no_opencore_amrnb
+ libcrypto_present
+ libssl_present
+ openssl_h_present
++libgnutls_present
++gnutls_h_present
+ ac_no_ssl
+ ac_webrtc_ldflags
+ ac_webrtc_cflags
+@@ -1491,8 +1493,8 @@ Optional Features:
+                           package and samples location using IPPROOT and
+                           IPPSAMPLES env var or with --with-ipp and
+                           --with-ipp-samples options
+-  --disable-ssl           Exclude SSL support the build (default: autodetect)
+-
++  --enable-ssl=backend    Select 'gnutls' or 'openssl' (default) to provide
++                          SSL support (autodetect)
+   --disable-opencore-amr  Exclude OpenCORE AMR support from the build
+                           (default: autodetect)
+ 
+@@ -7826,33 +7828,160 @@ fi
+ 
+ # Check whether --enable-ssl was given.
+ if test "${enable_ssl+set}" = set; then :
+-  enableval=$enable_ssl;
+-		if test "$enable_ssl" = "no"; then
+-		 ac_no_ssl=1
+-		 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5
++  enableval=$enable_ssl;  if test "x$enableval" = "xgnutls"; then
++                    ssl_backend="gnutls"
++                else
++                    ssl_backend="openssl"
++
++                fi
++
++fi
++
++
++if test "x$enable_ssl" = "xno"; then
++    ac_no_ssl=1
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5
+ $as_echo "Checking if SSL support is disabled... yes" >&6; }
+-	        fi
++else
++    if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
++        CFLAGS="$CFLAGS -I$with_ssl/include"
++        LDFLAGS="$LDFLAGS -L$with_ssl/lib"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5
++$as_echo "Using SSL prefix... $with_ssl" >&6; }
++    fi
++    if test "x$ssl_backend" = "xgnutls"; then
++        for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py"
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_PKG_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$PKG_CONFIG"; then
++  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_PKG_CONFIG="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
++
++  test -n "$PKG_CONFIG" && break
++done
++test -n "$PKG_CONFIG" || PKG_CONFIG="none"
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5
++$as_echo "checking for GnuTLS installations.." >&6; }
++
++
++        ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
++if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then :
++  gnutls_h_present=1
++fi
++
++
++
++        if test "$PKG_CONFIG" != "none"; then
++            if $PKG_CONFIG --exists gnutls; then
++                LIBS="$LIBS `$PKG_CONFIG --libs gnutls`"
++                libgnutls_present=1
++            else
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5
++$as_echo_n "checking for gnutls_certificate_set_x509_system_trust in -lgnutls... " >&6; }
++if ${ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgnutls  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gnutls_certificate_set_x509_system_trust ();
++int
++main ()
++{
++return gnutls_certificate_set_x509_system_trust ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=yes
++else
++  ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&5
++$as_echo "$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&6; }
++if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" = xyes; then :
++  libgnutls_present=1 &&
++                              LIBS="$LIBS -lgnutls"
++fi
++
++            fi
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5
++$as_echo "*** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&6; }
++        fi
++
++        if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5
++$as_echo "GnuTLS library found, SSL support enabled" >&6; }
++            # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
++            #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
++            $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h
++
++            $as_echo "#define PJ_HAS_TLS_SOCK 1" >>confdefs.h
++
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5
++$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; }
++        fi
++    else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5
+ $as_echo "checking for OpenSSL installations.." >&6; }
+-                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
+-                    CFLAGS="$CFLAGS -I$with_ssl/include"
+-                    LDFLAGS="$LDFLAGS -L$with_ssl/lib"
+-                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5
+-$as_echo "Using SSL prefix... $with_ssl" >&6; }
+-                fi
+ 
+ 
+ 
+-		ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
++        ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+ if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+   openssl_h_present=1
+ fi
+ 
+ 
+-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5
+ $as_echo_n "checking for ERR_load_BIO_strings in -lcrypto... " >&6; }
+ if ${ac_cv_lib_crypto_ERR_load_BIO_strings+:} false; then :
+   $as_echo_n "(cached) " >&6
+@@ -7892,7 +8021,7 @@ if test "x$ac_cv_lib_crypto_ERR_load_BIO_strings" = xyes; then :
+   libcrypto_present=1 && LIBS="-lcrypto $LIBS"
+ fi
+ 
+-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
+ $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
+ if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
+   $as_echo_n "(cached) " >&6
+@@ -7932,22 +8061,23 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
+   libssl_present=1 && LIBS="-lssl $LIBS"
+ fi
+ 
+-		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
+-	        	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5
++        if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5
+ $as_echo "OpenSSL library found, SSL support enabled" >&6; }
+-			# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
+-			#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
+-			$as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h
++            # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
++            #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
++            $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h
+ 
+-		else
+-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found, disabling SSL support **" >&5
+-$as_echo "** OpenSSL libraries not found, disabling SSL support **" >&6; }
+-		fi
++            $as_echo "#define PJ_HAS_TLS_SOCK 0" >>confdefs.h
+ 
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No OpenSSL libraries found, disabling SSL support **" >&5
++$as_echo "** No OpenSSL libraries found, disabling SSL support **" >&6; }
++        fi
++    fi
+ fi
+ 
+ 
+-
+ # Check whether --with-opencore-amrnb was given.
+ if test "${with_opencore_amrnb+set}" = set; then :
+   withval=$with_opencore_amrnb; as_fn_error $? "This option is obsolete and replaced by --with-opencore-amr=DIR" "$LINENO" 5
+--- a/aconfigure.ac
++++ b/aconfigure.ac
+@@ -1566,38 +1566,77 @@ fi
+ 
+ dnl # Include SSL support
+ AC_SUBST(ac_no_ssl)
+-AC_ARG_ENABLE(ssl,
+-	      AS_HELP_STRING([--disable-ssl],
+-			     [Exclude SSL support the build (default: autodetect)])
+-	      ,
+-	      [
+-		if test "$enable_ssl" = "no"; then
+-		 [ac_no_ssl=1]
+-		 AC_MSG_RESULT([Checking if SSL support is disabled... yes])
+-	        fi
+-	      ],
+-	      [
+-		AC_MSG_RESULT([checking for OpenSSL installations..])
+-                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
+-                    CFLAGS="$CFLAGS -I$with_ssl/include"
+-                    LDFLAGS="$LDFLAGS -L$with_ssl/lib"
+-                    AC_MSG_RESULT([Using SSL prefix... $with_ssl])
++AC_ARG_ENABLE([ssl],
++              AS_HELP_STRING([--enable-ssl[=backend]],
++                             [Select 'gnutls' or 'openssl' (default) to provide SSL support (autodetect)]),
++              [ if test "x$enableval" = "xgnutls"; then
++                    [ssl_backend="gnutls"]
++                else
++                    [ssl_backend="openssl"]
++
+                 fi
+-		AC_SUBST(openssl_h_present)
+-		AC_SUBST(libssl_present)
+-		AC_SUBST(libcrypto_present)
+-		AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
+-		AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
+-		AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"])
+-		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
+-	        	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
+-			# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
+-			#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
+-			AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
+-		else
+-			AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
+-		fi
+-	      ])
++              ])
++
++if test "x$enable_ssl" = "xno"; then
++    [ac_no_ssl=1]
++    AC_MSG_RESULT([Checking if SSL support is disabled... yes])
++else
++    if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
++        CFLAGS="$CFLAGS -I$with_ssl/include"
++        LDFLAGS="$LDFLAGS -L$with_ssl/lib"
++        AC_MSG_RESULT([Using SSL prefix... $with_ssl])
++    fi
++    if test "x$ssl_backend" = "xgnutls"; then
++        AC_CHECK_PROGS(PKG_CONFIG,
++                       $host-pkg-config pkg-config "python pkgconfig.py",
++                       none)
++        AC_MSG_RESULT([checking for GnuTLS installations..])
++        AC_SUBST(gnutls_h_present)
++        AC_SUBST(libgnutls_present)
++        AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1])
++
++        if test "$PKG_CONFIG" != "none"; then
++            if $PKG_CONFIG --exists gnutls; then
++                LIBS="$LIBS `$PKG_CONFIG --libs gnutls`"
++                libgnutls_present=1
++            else
++                AC_CHECK_LIB(gnutls,
++                             gnutls_certificate_set_x509_system_trust,
++                             [libgnutls_present=1 &&
++                              LIBS="$LIBS -lgnutls"])
++            fi
++        else
++            AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***])
++        fi
++
++        if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then
++            AC_MSG_RESULT([GnuTLS library found, SSL support enabled])
++            # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
++            #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
++            AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
++            AC_DEFINE(PJ_HAS_TLS_SOCK, 1)
++        else
++            AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **])
++        fi
++    else
++        AC_MSG_RESULT([checking for OpenSSL installations..])
++        AC_SUBST(openssl_h_present)
++        AC_SUBST(libssl_present)
++        AC_SUBST(libcrypto_present)
++        AC_CHECK_HEADER(openssl/ssl.h, [openssl_h_present=1])
++        AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
++        AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"])
++        if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
++            AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
++            # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
++            #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
++            AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
++            AC_DEFINE(PJ_HAS_TLS_SOCK, 0)
++        else
++            AC_MSG_RESULT([** No OpenSSL libraries found, disabling SSL support **])
++        fi
++    fi
++fi
+ 
+ dnl # Obsolete option --with-opencore-amrnb
+ AC_ARG_WITH(opencore-amrnb,
+--- a/pjlib/build/Makefile
++++ b/pjlib/build/Makefile
+@@ -35,7 +35,7 @@ export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+ 	guid.o hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \
+ 	os_info.o pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \
+ 	rbtree.o sock_common.o sock_qos_common.o sock_qos_bsd.o \
+-	ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \
++	ssl_sock_common.o ssl_sock_ossl.o ssl_sock_gtls.o ssl_sock_dump.o \
+ 	string.o timer.o types.o
+ export PJLIB_CFLAGS += $(_CFLAGS)
+ export PJLIB_CXXFLAGS += $(_CXXFLAGS)
+--- a/pjlib/include/pj/compat/os_auto.h.in
++++ b/pjlib/include/pj/compat/os_auto.h.in
+@@ -209,6 +209,9 @@
+ #ifndef PJ_HAS_SSL_SOCK
+ #undef PJ_HAS_SSL_SOCK
+ #endif
++#ifndef PJ_HAS_TLS_SOCK
++#undef PJ_HAS_TLS_SOCK
++#endif
+ 
+ 
+ #endif	/* __PJ_COMPAT_OS_AUTO_H__ */
+--- a/pjlib/include/pj/config.h
++++ b/pjlib/include/pj/config.h
+@@ -855,13 +861,15 @@
+ 
+ /**
+  * Enable secure socket. For most platforms, this is implemented using
+- * OpenSSL, so this will require OpenSSL to be installed. For Symbian
++ * OpenSSL, so this will require OpenSSL or GnuTLS to be installed. For Symbian
+  * platform, this is implemented natively using CSecureSocket.
+  *
+  * Default: 0 (for now)
+  */
+ #ifndef PJ_HAS_SSL_SOCK
+ #  define PJ_HAS_SSL_SOCK	    0
++   // When set to 1 secure sockets will use the GnuTLS backend
++#  define PJ_HAS_TLS_SOCK	    0
+ #endif
+ 
+ 
+--- a/pjlib/include/pj/ssl_sock.h
++++ b/pjlib/include/pj/ssl_sock.h
+@@ -184,6 +184,11 @@ typedef struct pj_ssl_cert_info {
+     pj_str_t raw;		    /**< Raw certificate in PEM format, only
+ 					 available for remote certificate. */
+ 
++    struct {
++        unsigned    cnt;        /**< # of entry     */
++        pj_str_t* cert_raw;
++    } raw_chain;
++
+ } pj_ssl_cert_info;
+ 
+ 
+--- a/pjlib/src/pj/ssl_sock_common.c
++++ b/pjlib/src/pj/ssl_sock_common.c
+@@ -35,7 +35,12 @@ PJ_DEF(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param)
+     param->async_cnt = 1;
+     param->concurrency = -1;
+     param->whole_data = PJ_TRUE;
++#if defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 1
++    // GnuTLS is allowed to send bigger chunks
++    param->send_buffer_size = 65536;
++#else
+     param->send_buffer_size = 8192;
++#endif
+ #if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0
+     param->read_buffer_size = 1500;
+ #endif
+--- /dev/null
++++ b/pjlib/src/pj/ssl_sock_gtls.c
+@@ -0,0 +1,2887 @@
++/* $Id$ */
++/*
++ * Copyright (C) 2014-2016 Savoir-faire Linux. (https://www.savoirfairelinux.com)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ */
++
++#include <pj/ssl_sock.h>
++#include <pj/activesock.h>
++#include <pj/compat/socket.h>
++#include <pj/assert.h>
++#include <pj/errno.h>
++#include <pj/list.h>
++#include <pj/lock.h>
++#include <pj/log.h>
++#include <pj/math.h>
++#include <pj/os.h>
++#include <pj/pool.h>
++#include <pj/string.h>
++#include <pj/timer.h>
++#include <pj/file_io.h>
++
++#if GNUTLS_VERSION_NUMBER < 0x030306 && !defined(_MSC_VER)
++#include <dirent.h>
++#endif
++
++#include <errno.h>
++
++/* Only build when PJ_HAS_SSL_SOCK and PJ_HAS_TLS_SOCK are enabled */
++#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
++    defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK != 0
++
++#define THIS_FILE               "ssl_sock_gtls.c"
++
++/* Workaround for ticket #985 */
++#define DELAYED_CLOSE_TIMEOUT   200
++
++/* Maximum ciphers */
++#define MAX_CIPHERS             100
++
++/* Standard trust locations */
++#define TRUST_STORE_FILE1 "/etc/ssl/certs/ca-certificates.crt"
++#define TRUST_STORE_FILE2 "/etc/ssl/certs/ca-bundle.crt"
++
++/* Debugging output level for GnuTLS only */
++#define GNUTLS_LOG_LEVEL 0
++
++/* GnuTLS includes */
++#include <gnutls/gnutls.h>
++#include <gnutls/x509.h>
++#include <gnutls/abstract.h>
++
++#ifdef _MSC_VER
++#  pragma comment( lib, "libgnutls")
++#endif
++
++
++/* TLS state enumeration. */
++enum tls_connection_state {
++    TLS_STATE_NULL,
++    TLS_STATE_HANDSHAKING,
++    TLS_STATE_ESTABLISHED
++};
++
++/* Internal timer types. */
++enum timer_id {
++    TIMER_NONE,
++    TIMER_HANDSHAKE_TIMEOUT,
++    TIMER_CLOSE
++};
++
++/* Structure of SSL socket read buffer. */
++typedef struct read_data_t {
++    void *data;
++    pj_size_t len;
++} read_data_t;
++
++/*
++ * Get the offset of pointer to read-buffer of SSL socket from read-buffer
++ * of active socket. Note that both SSL socket and active socket employ
++ * different but correlated read-buffers (as much as async_cnt for each),
++ * and to make it easier/faster to find corresponding SSL socket's read-buffer
++ * from known active socket's read-buffer, the pointer of corresponding
++ * SSL socket's read-buffer is stored right after the end of active socket's
++ * read-buffer.
++ */
++#define OFFSET_OF_READ_DATA_PTR(ssock, asock_rbuf) \
++                                        (read_data_t**) \
++                                        ((pj_int8_t *)(asock_rbuf) + \
++                                        ssock->param.read_buffer_size)
++
++/* Structure of SSL socket write data. */
++typedef struct write_data_t {
++    PJ_DECL_LIST_MEMBER(struct write_data_t);
++    pj_ioqueue_op_key_t  key;
++    pj_size_t            record_len;
++    pj_ioqueue_op_key_t *app_key;
++    pj_size_t            plain_data_len;
++    pj_size_t            data_len;
++    unsigned             flags;
++    union {
++        char             content[1];
++        const char      *ptr;
++    } data;
++} write_data_t;
++
++
++/* Structure of SSL socket write buffer (circular buffer). */
++typedef struct send_buf_t {
++    char                *buf;
++    pj_size_t            max_len;
++    char                *start;
++    pj_size_t            len;
++} send_buf_t;
++
++
++/* Circular buffer object */
++typedef struct circ_buf_t {
++    pj_size_t      cap;    /* maximum number of elements (must be power of 2) */
++    pj_size_t      readp;  /* index of oldest element */
++    pj_size_t      writep; /* index at which to write new element  */
++    pj_size_t      size;   /* number of elements */
++    pj_uint8_t    *buf;    /* data buffer */
++    pj_pool_t     *pool;   /* where new allocations will take place */
++} circ_buf_t;
++
++
++/* Secure socket structure definition. */
++struct pj_ssl_sock_t {
++    pj_pool_t            *pool;
++    pj_ssl_sock_t        *parent;
++    pj_ssl_sock_param     param;
++    pj_ssl_sock_param     newsock_param;
++    pj_ssl_cert_t        *cert;
++
++    pj_ssl_cert_info      local_cert_info;
++    pj_ssl_cert_info      remote_cert_info;
++
++    pj_bool_t             is_server;
++    enum tls_connection_state connection_state;
++    pj_ioqueue_op_key_t   handshake_op_key;
++    pj_timer_entry        timer;
++    pj_status_t           verify_status;
++
++    int                   last_err;
++
++    pj_sock_t             sock;
++    pj_activesock_t      *asock;
++
++    pj_sockaddr           local_addr;
++    pj_sockaddr           rem_addr;
++    int                   addr_len;
++
++    pj_bool_t             read_started;
++    pj_size_t             read_size;
++    pj_uint32_t           read_flags;
++    void                **asock_rbuf;
++    read_data_t          *ssock_rbuf;
++
++    write_data_t          write_pending;       /* list of pending writes */
++    write_data_t          write_pending_empty; /* cache for write_pending */
++    pj_bool_t             flushing_write_pend; /* flag of flushing is ongoing */
++    send_buf_t            send_buf;
++    write_data_t          send_pending; /* list of pending write to network */
++
++    gnutls_session_t      session;
++    gnutls_certificate_credentials_t xcred;
++
++    circ_buf_t            circ_buf_input;
++    pj_lock_t            *circ_buf_input_mutex;
++
++    circ_buf_t            circ_buf_output;
++    pj_lock_t            *circ_buf_output_mutex;
++
++    int                   tls_init_count; /* library initialization counter */
++};
++
++
++/* Certificate/credential structure definition. */
++struct pj_ssl_cert_t {
++    pj_str_t CA_file;
++    pj_str_t CA_path;
++    pj_str_t cert_file;
++    pj_str_t privkey_file;
++    pj_str_t privkey_pass;
++};
++
++/* GnuTLS available ciphers */
++static unsigned tls_available_ciphers;
++
++/* Array of id/names for available ciphers */
++static struct tls_ciphers_t {
++    pj_ssl_cipher id;
++    const char *name;
++} tls_ciphers[MAX_CIPHERS];
++
++/* Last error reported somehow */
++static int tls_last_error;
++
++
++/*
++ *******************************************************************
++ * Circular buffer functions.
++ *******************************************************************
++ */
++
++static pj_status_t circ_init(pj_pool_factory *factory,
++                             circ_buf_t *cb, pj_size_t cap)
++{
++    cb->cap    = cap;
++    cb->readp  = 0;
++    cb->writep = 0;
++    cb->size   = 0;
++
++    /* Initial pool holding the buffer elements */
++    cb->pool = pj_pool_create(factory, "tls-circ%p", cap, cap, NULL);
++    if (!cb->pool)
++        return PJ_ENOMEM;
++
++    /* Allocate circular buffer */
++    cb->buf = pj_pool_alloc(cb->pool, cap);
++    if (!cb->buf) {
++        pj_pool_release(cb->pool);
++        return PJ_ENOMEM;
++    }
++
++    return PJ_SUCCESS;
++}
++
++static void circ_deinit(circ_buf_t *cb)
++{
++    if (cb->pool) {
++        pj_pool_release(cb->pool);
++        cb->pool = NULL;
++    }
++}
++
++static pj_bool_t circ_empty(const circ_buf_t *cb)
++{
++    return cb->size == 0;
++}
++
++static pj_size_t circ_size(const circ_buf_t *cb)
++{
++    return cb->size;
++}
++
++static pj_size_t circ_avail(const circ_buf_t *cb)
++{
++    return cb->cap - cb->size;
++}
++
++static void circ_read(circ_buf_t *cb, pj_uint8_t *dst, pj_size_t len)
++{
++    pj_size_t size_after = cb->cap - cb->readp;
++    pj_size_t tbc = PJ_MIN(size_after, len);
++    pj_size_t rem = len - tbc;
++
++    pj_memcpy(dst, cb->buf + cb->readp, tbc);
++    pj_memcpy(dst + tbc, cb->buf, rem);
++
++    cb->readp += len;
++    cb->readp &= (cb->cap - 1);
++
++    cb->size -= len;
++}
++
++static pj_status_t circ_write(circ_buf_t *cb,
++                              const pj_uint8_t *src, pj_size_t len)
++{
++    /* Overflow condition: resize */
++    if (len > circ_avail(cb)) {
++        /* Minimum required capacity */
++        pj_size_t min_cap = len + cb->size;
++
++        /* Next 32-bit power of two */
++        min_cap--;
++        min_cap |= min_cap >> 1;
++        min_cap |= min_cap >> 2;
++        min_cap |= min_cap >> 4;
++        min_cap |= min_cap >> 8;
++        min_cap |= min_cap >> 16;
++        min_cap++;
++
++        /* Create a new pool to hold a bigger buffer, using the same factory */
++        pj_pool_t *pool = pj_pool_create(cb->pool->factory, "tls-circ%p",
++                                         min_cap, min_cap, NULL);
++        if (!pool)
++            return PJ_ENOMEM;
++
++        /* Allocate our new buffer */
++        pj_uint8_t *buf = pj_pool_alloc(pool, min_cap);
++        if (!buf) {
++            pj_pool_release(pool);
++            return PJ_ENOMEM;
++        }
++
++        /* Save old size, which we shall restore after the next read */
++        pj_size_t old_size = cb->size;
++
++        /* Copy old data into beginning of new buffer */
++        circ_read(cb, buf, cb->size);
++
++        /* Restore old size now */
++        cb->size = old_size;
++
++        /* Release the previous pool */
++        pj_pool_release(cb->pool);
++
++        /* Update circular buffer members */
++        cb->pool = pool;
++        cb->buf = buf;
++        cb->readp = 0;
++        cb->writep = cb->size;
++        cb->cap = min_cap;
++    }
++
++    pj_size_t size_after = cb->cap - cb->writep;
++    pj_size_t tbc = PJ_MIN(size_after, len);
++    pj_size_t rem = len - tbc;
++
++    pj_memcpy(cb->buf + cb->writep, src, tbc);
++    pj_memcpy(cb->buf, src + tbc, rem);
++
++    cb->writep += len;
++    cb->writep &= (cb->cap - 1);
++
++    cb->size += len;
++
++    return PJ_SUCCESS;
++}
++
++
++/*
++ *******************************************************************
++ * Static/internal functions.
++ *******************************************************************
++ */
++
++/* Convert from GnuTLS error to pj_status_t. */
++static pj_status_t tls_status_from_err(pj_ssl_sock_t *ssock, int err)
++{
++    pj_status_t status;
++
++    switch (err) {
++    case GNUTLS_E_SUCCESS:
++        status = PJ_SUCCESS;
++        break;
++    case GNUTLS_E_MEMORY_ERROR:
++        status = PJ_ENOMEM;
++        break;
++    case GNUTLS_E_LARGE_PACKET:
++        status = PJ_ETOOBIG;
++        break;
++    case GNUTLS_E_NO_CERTIFICATE_FOUND:
++        status = PJ_ENOTFOUND;
++        break;
++    case GNUTLS_E_SESSION_EOF:
++        status = PJ_EEOF;
++        break;
++    case GNUTLS_E_HANDSHAKE_TOO_LARGE:
++        status = PJ_ETOOBIG;
++        break;
++    case GNUTLS_E_EXPIRED:
++        status = PJ_EGONE;
++        break;
++    case GNUTLS_E_TIMEDOUT:
++        status = PJ_ETIMEDOUT;
++        break;
++    case GNUTLS_E_PREMATURE_TERMINATION:
++        status = PJ_ECANCELLED;
++        break;
++    case GNUTLS_E_INTERNAL_ERROR:
++    case GNUTLS_E_UNIMPLEMENTED_FEATURE:
++        status = PJ_EBUG;
++        break;
++    case GNUTLS_E_AGAIN:
++    case GNUTLS_E_INTERRUPTED:
++    case GNUTLS_E_REHANDSHAKE:
++        status = PJ_EPENDING;
++        break;
++    case GNUTLS_E_TOO_MANY_EMPTY_PACKETS:
++    case GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS:
++    case GNUTLS_E_RECORD_LIMIT_REACHED:
++        status = PJ_ETOOMANY;
++        break;
++    case GNUTLS_E_UNSUPPORTED_VERSION_PACKET:
++    case GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM:
++    case GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE:
++    case GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE:
++    case GNUTLS_E_X509_UNSUPPORTED_EXTENSION:
++    case GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION:
++        status = PJ_ENOTSUP;
++        break;
++    case GNUTLS_E_INVALID_SESSION:
++    case GNUTLS_E_INVALID_REQUEST:
++    case GNUTLS_E_INVALID_PASSWORD:
++    case GNUTLS_E_ILLEGAL_PARAMETER:
++    case GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION:
++    case GNUTLS_E_UNEXPECTED_PACKET:
++    case GNUTLS_E_UNEXPECTED_PACKET_LENGTH:
++    case GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET:
++    case GNUTLS_E_UNWANTED_ALGORITHM:
++    case GNUTLS_E_USER_ERROR:
++        status = PJ_EINVAL;
++        break;
++    default:
++        status = PJ_EUNKNOWN;
++        break;
++    }
++
++    /* Not thread safe */
++    tls_last_error = err;
++    if (ssock)
++        ssock->last_err = err;
++    return status;
++}
++
++
++/* Get error string from GnuTLS using tls_last_error */
++static pj_str_t tls_strerror(pj_status_t status,
++                             char *buf, pj_size_t bufsize)
++{
++    pj_str_t errstr;
++    const char *tmp = gnutls_strerror(tls_last_error);
++
++#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
++    if (tmp) {
++        pj_ansi_strncpy(buf, tmp, bufsize);
++        errstr = pj_str(buf);
++        return errstr;
++    }
++#endif /* PJ_HAS_ERROR_STRING */
++
++    errstr.ptr = buf;
++    errstr.slen = pj_ansi_snprintf(buf, bufsize, "GnuTLS error %d: %s",
++                                   tls_last_error, tmp);
++    if (errstr.slen < 1 || errstr.slen >= (int) bufsize)
++        errstr.slen = bufsize - 1;
++
++    return errstr;
++}
++
++
++/* GnuTLS way of reporting internal operations. */
++static void tls_print_logs(int level, const char* msg)
++{
++    PJ_LOG(3, (THIS_FILE, "GnuTLS [%d]: %s", level, msg));
++}
++
++
++/* Initialize GnuTLS. */
++static pj_status_t tls_init(void)
++{
++    /* Register error subsystem */
++    pj_status_t status = pj_register_strerror(PJ_ERRNO_START_USER +
++                                              PJ_ERRNO_SPACE_SIZE * 6,
++                                              PJ_ERRNO_SPACE_SIZE,
++                                              &tls_strerror);
++    pj_assert(status == PJ_SUCCESS);
++
++    /* Init GnuTLS library */
++    int ret = gnutls_global_init();
++    if (ret < 0)
++        return tls_status_from_err(NULL, ret);
++
++    gnutls_global_set_log_level(GNUTLS_LOG_LEVEL);
++    gnutls_global_set_log_function(tls_print_logs);
++
++    /* Init available ciphers */
++    if (!tls_available_ciphers) {
++        unsigned int i;
++
++        for (i = 0; ; i++) {
++            unsigned char id[2];
++            const char *suite = gnutls_cipher_suite_info(i, (unsigned char *)id,
++                                                         NULL, NULL, NULL, NULL);
++            tls_ciphers[i].id = 0;
++            /* usually the array size is bigger than the number of available
++             * ciphers anyway, so by checking here we can exit the loop as soon
++             * as either all ciphers have been added or the array is full */
++            if (suite && i < PJ_ARRAY_SIZE(tls_ciphers)) {
++                tls_ciphers[i].id = (pj_ssl_cipher)
++                    (pj_uint32_t) ((id[0] << 8) | id[1]);
++                tls_ciphers[i].name = suite;
++            } else
++                break;
++        }
++
++        tls_available_ciphers = i;
++    }
++
++    return PJ_SUCCESS;
++}
++
++
++/* Shutdown GnuTLS */
++static void tls_deinit(void)
++{
++    gnutls_global_deinit();
++}
++
++
++/* Callback invoked every time a certificate has to be validated. */
++static int tls_cert_verify_cb(gnutls_session_t session)
++{
++    pj_ssl_sock_t *ssock;
++    unsigned int status;
++    int ret;
++
++    /* Get SSL socket instance */
++    ssock = (pj_ssl_sock_t *)gnutls_session_get_ptr(session);
++    pj_assert(ssock);
++
++    /* Support only x509 format */
++    ret = gnutls_certificate_type_get(session) != GNUTLS_CRT_X509;
++    if (ret < 0) {
++        ssock->verify_status |= PJ_SSL_CERT_EINVALID_FORMAT;
++        return GNUTLS_E_CERTIFICATE_ERROR;
++    }
++
++    /* Store verification status */
++    ret = gnutls_certificate_verify_peers2(session, &status);
++    if (ret < 0) {
++        ssock->verify_status |= PJ_SSL_CERT_EUNKNOWN;
++        return GNUTLS_E_CERTIFICATE_ERROR;
++    }
++    if (ssock->param.verify_peer) {
++    if (status & GNUTLS_CERT_INVALID) {
++        if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
++            ssock->verify_status |= PJ_SSL_CERT_EISSUER_NOT_FOUND;
++        else if (status & GNUTLS_CERT_EXPIRED ||
++                 status & GNUTLS_CERT_NOT_ACTIVATED)
++            ssock->verify_status |= PJ_SSL_CERT_EVALIDITY_PERIOD;
++        else if (status & GNUTLS_CERT_SIGNER_NOT_CA ||
++                 status & GNUTLS_CERT_INSECURE_ALGORITHM)
++            ssock->verify_status |= PJ_SSL_CERT_EUNTRUSTED;
++        else if (status & GNUTLS_CERT_UNEXPECTED_OWNER ||
++                 status & GNUTLS_CERT_MISMATCH)
++            ssock->verify_status |= PJ_SSL_CERT_EISSUER_MISMATCH;
++        else if (status & GNUTLS_CERT_REVOKED)
++            ssock->verify_status |= PJ_SSL_CERT_EREVOKED;
++        else
++            ssock->verify_status |= PJ_SSL_CERT_EUNKNOWN;
++
++        return GNUTLS_E_CERTIFICATE_ERROR;
++    }
++
++    /* When verification is not requested just return ok here, however
++     * applications can still get the verification status. */
++        gnutls_x509_crt_t cert;
++        unsigned int cert_list_size;
++        const gnutls_datum_t *cert_list;
++        int ret;
++
++        ret = gnutls_x509_crt_init(&cert);
++        if (ret < 0)
++            goto out;
++
++        cert_list = gnutls_certificate_get_peers(session, &cert_list_size);
++        if (cert_list == NULL) {
++            ret = GNUTLS_E_NO_CERTIFICATE_FOUND;
++            goto out;
++        }
++
++        /* TODO: verify whole chain perhaps? */
++        ret = gnutls_x509_crt_import(cert, &cert_list[0], GNUTLS_X509_FMT_DER);
++        if (ret < 0)
++            ret = gnutls_x509_crt_import(cert, &cert_list[0],
++                                         GNUTLS_X509_FMT_PEM);
++        if (ret < 0) {
++            ssock->verify_status |= PJ_SSL_CERT_EINVALID_FORMAT;
++            goto out;
++        }
++        ret = gnutls_x509_crt_check_hostname(cert, ssock->param.server_name.ptr);
++        if (ret < 0)
++            goto out;
++
++        gnutls_x509_crt_deinit(cert);
++
++        /* notify GnuTLS to continue handshake normally */
++        return GNUTLS_E_SUCCESS;
++
++out:
++        tls_last_error = ret;
++        ssock->verify_status |= PJ_SSL_CERT_EUNKNOWN;
++        return GNUTLS_E_CERTIFICATE_ERROR;
++    }
++
++    return GNUTLS_E_SUCCESS;
++}
++
++
++/* gnutls_handshake() and gnutls_record_send() will call this function to
++ * send/write (encrypted) data */
++static ssize_t tls_data_push(gnutls_transport_ptr_t ptr,
++                             const void *data, size_t len)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t *)ptr;
++
++    pj_lock_acquire(ssock->circ_buf_output_mutex);
++    if (circ_write(&ssock->circ_buf_output, data, len) != PJ_SUCCESS) {
++        pj_lock_release(ssock->circ_buf_output_mutex);
++
++        gnutls_transport_set_errno(ssock->session, ENOMEM);
++        return -1;
++    }
++
++    pj_lock_release(ssock->circ_buf_output_mutex);
++
++    return len;
++}
++
++
++/* gnutls_handshake() and gnutls_record_recv() will call this function to
++ * receive/read (encrypted) data */
++static ssize_t tls_data_pull(gnutls_transport_ptr_t ptr,
++                             void *data, pj_size_t len)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t *)ptr;
++
++    pj_lock_acquire(ssock->circ_buf_input_mutex);
++
++    if (circ_empty(&ssock->circ_buf_input)) {
++        pj_lock_release(ssock->circ_buf_input_mutex);
++
++        /* Data buffers not yet filled */
++        gnutls_transport_set_errno(ssock->session, EAGAIN);
++        return -1;
++    }
++
++    pj_size_t circ_buf_size = circ_size(&ssock->circ_buf_input);
++    pj_size_t read_size = PJ_MIN(circ_buf_size, len);
++
++    circ_read(&ssock->circ_buf_input, data, read_size);
++
++    pj_lock_release(ssock->circ_buf_input_mutex);
++
++    return read_size;
++}
++
++
++/* Append a string to the priority string, only once. */
++static pj_status_t tls_str_append_once(pj_str_t *dst, pj_str_t *src)
++{
++    if (pj_strstr(dst, src) == NULL) {
++        /* Check buffer size */
++        if (dst->slen + src->slen + 3 > 1024)
++            return PJ_ETOOMANY;
++
++        pj_strcat2(dst, ":+");
++        pj_strcat(dst, src);
++    }
++    return PJ_SUCCESS;
++}
++
++
++/* Generate priority string with user preference order. */
++static pj_status_t tls_priorities_set(pj_ssl_sock_t *ssock)
++{
++    char buf[1024];
++    char priority_buf[256];
++    pj_str_t cipher_list;
++    pj_str_t compression = pj_str("COMP-NULL");
++    pj_str_t server = pj_str(":%SERVER_PRECEDENCE");
++    int i, j, ret;
++    pj_str_t priority;
++    const char *err;
++
++    pj_strset(&cipher_list, buf, 0);
++    pj_strset(&priority, priority_buf, 0);
++
++    /* For each level, enable only the requested protocol */
++    pj_strcat2(&priority, "NORMAL:");
++    if (ssock->param.proto & PJ_SSL_SOCK_PROTO_TLS1_2) {
++        pj_strcat2(&priority, "+VERS-TLS1.2:");
++    }
++    if (ssock->param.proto & PJ_SSL_SOCK_PROTO_TLS1_1) {
++        pj_strcat2(&priority, "+VERS-TLS1.1:");
++    }
++    if (ssock->param.proto & PJ_SSL_SOCK_PROTO_TLS1) {
++        pj_strcat2(&priority, "+VERS-TLS1.0:");
++    }
++    pj_strcat2(&priority, "-VERS-SSL3.0:");
++    pj_strcat2(&priority, "%LATEST_RECORD_VERSION");
++
++    pj_strcat(&cipher_list, &priority);
++    for (i = 0; i < ssock->param.ciphers_num; i++) {
++        for (j = 0; ; j++) {
++            pj_ssl_cipher c;
++            const char *suite;
++            unsigned char id[2];
++            gnutls_protocol_t proto;
++            gnutls_kx_algorithm_t kx;
++            gnutls_mac_algorithm_t mac;
++            gnutls_cipher_algorithm_t algo;
++
++            suite = gnutls_cipher_suite_info(j, (unsigned char *)id,
++                                             &kx, &algo, &mac, &proto);
++            if (!suite)
++                break;
++
++            c = (pj_ssl_cipher) (pj_uint32_t) ((id[0] << 8) | id[1]);
++            if (ssock->param.ciphers[i] == c) {
++                char temp[256];
++                pj_str_t cipher_entry;
++
++                /* Protocol version */
++                pj_strset(&cipher_entry, temp, 0);
++                pj_strcat2(&cipher_entry, "VERS-");
++                pj_strcat2(&cipher_entry, gnutls_protocol_get_name(proto));
++                ret = tls_str_append_once(&cipher_list, &cipher_entry);
++                if (ret != PJ_SUCCESS)
++                    return ret;
++
++                /* Cipher */
++                pj_strset(&cipher_entry, temp, 0);
++                pj_strcat2(&cipher_entry, gnutls_cipher_get_name(algo));
++                ret = tls_str_append_once(&cipher_list, &cipher_entry);
++                if (ret != PJ_SUCCESS)
++                    return ret;
++
++                /* Mac */
++                pj_strset(&cipher_entry, temp, 0);
++                pj_strcat2(&cipher_entry, gnutls_mac_get_name(mac));
++                ret = tls_str_append_once(&cipher_list, &cipher_entry);
++                if (ret != PJ_SUCCESS)
++                    return ret;
++
++                /* Key exchange */
++                pj_strset(&cipher_entry, temp, 0);
++                pj_strcat2(&cipher_entry, gnutls_kx_get_name(kx));
++                ret = tls_str_append_once(&cipher_list, &cipher_entry);
++                if (ret != PJ_SUCCESS)
++                    return ret;
++
++                /* Compression is always disabled */
++                /* Signature is level-default */
++                break;
++            }
++        }
++    }
++
++    /* Disable compression, it's a TLS-only extension after all */
++    tls_str_append_once(&cipher_list, &compression);
++
++    /* Server will be the one deciding which crypto to use */
++    if (ssock->is_server) {
++        if (cipher_list.slen + server.slen + 1 > sizeof(buf))
++            return PJ_ETOOMANY;
++        else
++            pj_strcat(&cipher_list, &server);
++    }
++
++    /* End the string and print it */
++    cipher_list.ptr[cipher_list.slen] = '\0';
++    PJ_LOG(5, (ssock->pool->obj_name, "Priority string: %s", cipher_list.ptr));
++
++    /* Set our priority string */
++    ret = gnutls_priority_set_direct(ssock->session,
++                                        cipher_list.ptr, &err);
++    if (ret < 0) {
++        tls_last_error = GNUTLS_E_INVALID_REQUEST;
++        return PJ_EINVAL;
++    }
++
++    return PJ_SUCCESS;
++}
++
++
++/* Load root CA file or load the installed ones. */
++static pj_status_t tls_trust_set(pj_ssl_sock_t *ssock)
++{
++    int ntrusts = 0;
++    int err;
++
++    err = gnutls_certificate_set_x509_system_trust(ssock->xcred);
++    if (err > 0)
++        ntrusts += err;
++    err = gnutls_certificate_set_x509_trust_file(ssock->xcred,
++                                                 TRUST_STORE_FILE1,
++                                                 GNUTLS_X509_FMT_PEM);
++    if (err > 0)
++        ntrusts += err;
++
++    err = gnutls_certificate_set_x509_trust_file(ssock->xcred,
++                                                 TRUST_STORE_FILE2,
++                                                 GNUTLS_X509_FMT_PEM);
++    if (err > 0)
++        ntrusts += err;
++
++    if (ntrusts > 0)
++        return PJ_SUCCESS;
++    else if (!ntrusts)
++        return PJ_ENOTFOUND;
++    else
++        return PJ_EINVAL;
++}
++
++#if GNUTLS_VERSION_NUMBER < 0x030306
++
++#ifdef _POSIX_PATH_MAX
++# define GNUTLS_PATH_MAX _POSIX_PATH_MAX
++#else
++# define GNUTLS_PATH_MAX 256
++#endif
++
++static
++int gnutls_certificate_set_x509_trust_dir(gnutls_certificate_credentials_t cred, const char *dirname, unsigned type)
++{
++    DIR *dirp;
++    struct dirent *d;
++    int ret;
++    int r = 0;
++    char path[GNUTLS_PATH_MAX];
++#ifndef _WIN32
++    struct dirent e;
++#endif
++
++    dirp = opendir(dirname);
++    if (dirp != NULL) {
++        do {
++#ifdef _WIN32
++            d = readdir(dirp);
++            if (d != NULL) {
++#else
++            ret = readdir_r(dirp, &e, &d);
++            if (ret == 0 && d != NULL
++#ifdef _DIRENT_HAVE_D_TYPE
++                && (d->d_type == DT_REG || d->d_type == DT_LNK || d->d_type == DT_UNKNOWN)
++#endif
++            ) {
++#endif
++                snprintf(path, sizeof(path), "%s/%s",
++                     dirname, d->d_name);
++
++                ret = gnutls_certificate_set_x509_trust_file(cred, path, type);
++                if (ret >= 0)
++                    r += ret;
++            }
++        }
++        while (d != NULL);
++        closedir(dirp);
++    }
++
++    return r;
++}
++
++#endif
++
++/* Create and initialize new GnuTLS context and instance */
++static pj_status_t tls_open(pj_ssl_sock_t *ssock)
++{
++    pj_ssl_cert_t *cert;
++    pj_status_t status;
++    int ret;
++
++    pj_assert(ssock);
++
++    cert = ssock->cert;
++
++    /* Even if reopening is harmless, having one instance only simplifies
++     * deallocating it later on */
++    if (!ssock->tls_init_count) {
++        ssock->tls_init_count++;
++        ret = tls_init();
++        if (ret < 0)
++            return ret;
++    } else
++        return PJ_SUCCESS;
++
++    /* Start this socket session */
++    ret = gnutls_init(&ssock->session, ssock->is_server ? GNUTLS_SERVER
++                                                        : GNUTLS_CLIENT);
++    if (ret < 0)
++        goto out;
++
++    /* Set the ssock object to be retrieved by transport (send/recv) and by
++     * user data from this session */
++    gnutls_transport_set_ptr(ssock->session,
++                             (gnutls_transport_ptr_t) (uintptr_t) ssock);
++    gnutls_session_set_ptr(ssock->session,
++                           (gnutls_transport_ptr_t) (uintptr_t) ssock);
++
++    /* Initialize input circular buffer */
++    status = circ_init(ssock->pool->factory, &ssock->circ_buf_input, 512);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Initialize output circular buffer */
++    status = circ_init(ssock->pool->factory, &ssock->circ_buf_output, 512);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Set the callback that allows GnuTLS to PUSH and PULL data
++     * TO and FROM the transport layer */
++    gnutls_transport_set_push_function(ssock->session, tls_data_push);
++    gnutls_transport_set_pull_function(ssock->session, tls_data_pull);
++
++    /* Determine which cipher suite to support */
++    status = tls_priorities_set(ssock);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Allocate credentials for handshaking and transmission */
++    ret = gnutls_certificate_allocate_credentials(&ssock->xcred);
++    if (ret < 0)
++        goto out;
++    gnutls_certificate_set_verify_function(ssock->xcred, tls_cert_verify_cb);
++
++    /* Load system trust file(s) */
++    status = tls_trust_set(ssock);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Load user-provided CA, certificate and key if available */
++    if (cert) {
++        /* Load CA if one is specified. */
++        if (cert->CA_file.slen) {
++            ret = gnutls_certificate_set_x509_trust_file(ssock->xcred,
++                                                         cert->CA_file.ptr,
++                                                         GNUTLS_X509_FMT_PEM);
++            if (ret < 0)
++                ret = gnutls_certificate_set_x509_trust_file(ssock->xcred,
++                                                             cert->CA_file.ptr,
++                                                             GNUTLS_X509_FMT_DER);
++            if (ret < 0)
++                goto out;
++        }
++        if (cert->CA_path.slen) {
++            ret = gnutls_certificate_set_x509_trust_dir(ssock->xcred,
++                                                         cert->CA_path.ptr,
++                                                         GNUTLS_X509_FMT_PEM);
++            if (ret < 0)
++                ret = gnutls_certificate_set_x509_trust_dir(ssock->xcred,
++                                                             cert->CA_path.ptr,
++                                                             GNUTLS_X509_FMT_DER);
++            if (ret < 0)
++                goto out;
++        }
++
++        /* Load certificate, key and pass if one is specified */
++        if (cert->cert_file.slen && cert->privkey_file.slen) {
++            const char *prikey_file = cert->privkey_file.ptr;
++            const char *prikey_pass = cert->privkey_pass.slen
++                                    ? cert->privkey_pass.ptr
++                                    : NULL;
++            ret = gnutls_certificate_set_x509_key_file2(ssock->xcred,
++                                                        cert->cert_file.ptr,
++                                                        prikey_file,
++                                                        GNUTLS_X509_FMT_PEM,
++                                                        prikey_pass,
++                                                        0);
++            if (ret != GNUTLS_E_SUCCESS)
++                ret = gnutls_certificate_set_x509_key_file2(ssock->xcred,
++                                                            cert->cert_file.ptr,
++                                                            prikey_file,
++                                                            GNUTLS_X509_FMT_DER,
++                                                            prikey_pass,
++                                                            0);
++            if (ret < 0)
++                goto out;
++        }
++    }
++
++    /* Require client certificate if asked */
++    if (ssock->is_server && ssock->param.require_client_cert)
++        gnutls_certificate_server_set_request(ssock->session,
++                                              GNUTLS_CERT_REQUIRE);
++
++    /* Finally set credentials for this session */
++    ret = gnutls_credentials_set(ssock->session,
++                                 GNUTLS_CRD_CERTIFICATE, ssock->xcred);
++    if (ret < 0)
++        goto out;
++
++    ret = GNUTLS_E_SUCCESS;
++out:
++    return tls_status_from_err(ssock, ret);
++}
++
++
++/* Destroy GnuTLS credentials and session. */
++static void tls_close(pj_ssl_sock_t *ssock)
++{
++    if (ssock->session) {
++        gnutls_bye(ssock->session, GNUTLS_SHUT_RDWR);
++        gnutls_deinit(ssock->session);
++        ssock->session = NULL;
++    }
++
++    if (ssock->xcred) {
++        gnutls_certificate_free_credentials(ssock->xcred);
++        ssock->xcred = NULL;
++    }
++
++    /* Free GnuTLS library */
++    if (ssock->tls_init_count) {
++        ssock->tls_init_count--;
++        tls_deinit();
++    }
++
++    /* Destroy circular buffers */
++    circ_deinit(&ssock->circ_buf_input);
++    circ_deinit(&ssock->circ_buf_output);
++}
++
++
++/* Reset socket state. */
++static void tls_sock_reset(pj_ssl_sock_t *ssock)
++{
++    ssock->connection_state = TLS_STATE_NULL;
++
++    tls_close(ssock);
++
++    if (ssock->asock) {
++        pj_activesock_close(ssock->asock);
++        ssock->asock = NULL;
++        ssock->sock = PJ_INVALID_SOCKET;
++    }
++    if (ssock->sock != PJ_INVALID_SOCKET) {
++        pj_sock_close(ssock->sock);
++        ssock->sock = PJ_INVALID_SOCKET;
++    }
++
++    ssock->last_err = tls_last_error = GNUTLS_E_SUCCESS;
++}
++
++
++/* Get Common Name field string from a general name string */
++static void tls_cert_get_cn(const pj_str_t *gen_name, pj_str_t *cn)
++{
++    pj_str_t CN_sign = {"CN=", 3};
++    char *p, *q;
++
++    pj_bzero(cn, sizeof(cn));
++
++    p = pj_strstr(gen_name, &CN_sign);
++    if (!p)
++        return;
++
++    p += 3; /* shift pointer to value part */
++    pj_strset(cn, p, gen_name->slen - (p - gen_name->ptr));
++    q = pj_strchr(cn, ',');
++    if (q)
++        cn->slen = q - p;
++}
++
++
++/* Get certificate info; in case the certificate info is already populated,
++ * this function will check if the contents need updating by inspecting the
++ * issuer and the serial number. */
++static void tls_cert_get_info(pj_pool_t *pool, pj_ssl_cert_info *ci, gnutls_x509_crt_t cert)
++{
++    pj_bool_t update_needed;
++    char buf[512] = { 0 };
++    size_t bufsize = sizeof(buf);
++    pj_uint8_t serial_no[64] = { 0 }; /* should be >= sizeof(ci->serial_no) */
++    size_t serialsize = sizeof(serial_no);
++    size_t len = sizeof(buf);
++    int i, ret, seq = 0;
++    pj_ssl_cert_name_type type;
++
++    pj_assert(pool && ci && cert);
++
++    /* Get issuer */
++    gnutls_x509_crt_get_issuer_dn(cert, buf, &bufsize);
++
++    /* Get serial no */
++    gnutls_x509_crt_get_serial(cert, serial_no, &serialsize);
++
++    /* Check if the contents need to be updated */
++    update_needed = pj_strcmp2(&ci->issuer.info, buf) ||
++                    pj_memcmp(ci->serial_no, serial_no, serialsize);
++    if (!update_needed)
++        return;
++
++    /* Update cert info */
++
++    pj_bzero(ci, sizeof(pj_ssl_cert_info));
++
++    /* Version */
++    ci->version = gnutls_x509_crt_get_version(cert);
++
++    /* Issuer */
++    pj_strdup2(pool, &ci->issuer.info, buf);
++    tls_cert_get_cn(&ci->issuer.info, &ci->issuer.cn);
++
++    /* Serial number */
++    pj_memcpy(ci->serial_no, serial_no, sizeof(ci->serial_no));
++
++    /* Subject */
++    bufsize = sizeof(buf);
++    gnutls_x509_crt_get_dn(cert, buf, &bufsize);
++    pj_strdup2(pool, &ci->subject.info, buf);
++    tls_cert_get_cn(&ci->subject.info, &ci->subject.cn);
++
++    /* Validity */
++    ci->validity.end.sec = gnutls_x509_crt_get_expiration_time(cert);
++    ci->validity.start.sec = gnutls_x509_crt_get_activation_time(cert);
++    ci->validity.gmt = 0;
++
++    /* Subject Alternative Name extension */
++    if (ci->version >= 3) {
++        char out[256] = { 0 };
++        /* Get the number of all alternate names so that we can allocate
++         * the correct number of bytes in subj_alt_name */
++        while (gnutls_x509_crt_get_subject_alt_name(cert, seq, out, &len,
++                                                    NULL) != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
++            seq++;
++
++        ci->subj_alt_name.entry = pj_pool_calloc(pool, seq,
++                                                 sizeof(*ci->subj_alt_name.entry));
++        if (!ci->subj_alt_name.entry) {
++            tls_last_error = GNUTLS_E_MEMORY_ERROR;
++            return;
++        }
++
++        /* Now populate the alternative names */
++        for (i = 0; i < seq; i++) {
++            len = sizeof(out) - 1;
++            ret = gnutls_x509_crt_get_subject_alt_name(cert, i, out, &len, NULL);
++            switch (ret) {
++            case GNUTLS_SAN_IPADDRESS:
++                type = PJ_SSL_CERT_NAME_IP;
++                pj_inet_ntop2(len == sizeof(pj_in6_addr) ? pj_AF_INET6()
++                                                         : pj_AF_INET(),
++                              out, buf, sizeof(buf));
++                break;
++            case GNUTLS_SAN_URI:
++                type = PJ_SSL_CERT_NAME_URI;
++                break;
++            case GNUTLS_SAN_RFC822NAME:
++                type = PJ_SSL_CERT_NAME_RFC822;
++                break;
++            case GNUTLS_SAN_DNSNAME:
++                type = PJ_SSL_CERT_NAME_DNS;
++                break;
++            default:
++                type = PJ_SSL_CERT_NAME_UNKNOWN;
++                break;
++            }
++
++            if (len && type != PJ_SSL_CERT_NAME_UNKNOWN) {
++                ci->subj_alt_name.entry[ci->subj_alt_name.cnt].type = type;
++                pj_strdup2(pool,
++                           &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name,
++                           type == PJ_SSL_CERT_NAME_IP ? buf : out);
++                ci->subj_alt_name.cnt++;
++            }
++        }
++        /* TODO: if no DNS alt. names were found, we could check against
++         * the commonName as per RFC3280. */
++    }
++}
++
++static void tls_cert_get_chain_raw(pj_pool_t *pool, pj_ssl_cert_info *ci, const gnutls_datum_t *certs, size_t certs_num)
++{
++    size_t i=0;
++    ci->raw_chain.cert_raw = pj_pool_calloc(pool, certs_num, sizeof(*ci->raw_chain.cert_raw));
++    ci->raw_chain.cnt = certs_num;
++    for (i=0; i < certs_num; ++i) {
++        const pj_str_t crt_raw = {(const char*)certs[i].data, (pj_ssize_t)certs[i].size};
++        pj_strdup(pool, ci->raw_chain.cert_raw+i, &crt_raw);
++    }
++}
++
++/* Update local & remote certificates info. This function should be
++ * called after handshake or renegotiation successfully completed. */
++static void tls_cert_update(pj_ssl_sock_t *ssock)
++{
++    gnutls_x509_crt_t cert = NULL;
++    const gnutls_datum_t *us;
++    const gnutls_datum_t *certs;
++    unsigned int certslen = 0;
++    int ret = GNUTLS_CERT_INVALID;
++
++    pj_assert(ssock->connection_state == TLS_STATE_ESTABLISHED);
++
++    /* Get active local certificate */
++    us = gnutls_certificate_get_ours(ssock->session);
++    if (!us)
++        goto us_out;
++
++    ret = gnutls_x509_crt_init(&cert);
++    if (ret < 0)
++        goto us_out;
++    ret = gnutls_x509_crt_import(cert, us, GNUTLS_X509_FMT_DER);
++    if (ret < 0)
++        ret = gnutls_x509_crt_import(cert, us, GNUTLS_X509_FMT_PEM);
++    if (ret < 0)
++        goto us_out;
++
++    tls_cert_get_info(ssock->pool, &ssock->local_cert_info, cert);
++    tls_cert_get_chain_raw(ssock->pool, &ssock->local_cert_info, us, 1);
++
++us_out:
++    tls_last_error = ret;
++    if (cert)
++        gnutls_x509_crt_deinit(cert);
++    else
++        pj_bzero(&ssock->local_cert_info, sizeof(pj_ssl_cert_info));
++
++    cert = NULL;
++
++    /* Get active remote certificate */
++    certs = gnutls_certificate_get_peers(ssock->session, &certslen);
++    if (certs == NULL || certslen == 0)
++        goto peer_out;
++
++    ret = gnutls_x509_crt_init(&cert);
++    if (ret < 0)
++        goto peer_out;
++
++    ret = gnutls_x509_crt_import(cert, certs, GNUTLS_X509_FMT_PEM);
++    if (ret < 0)
++        ret = gnutls_x509_crt_import(cert, certs, GNUTLS_X509_FMT_DER);
++    if (ret < 0)
++        goto peer_out;
++
++    tls_cert_get_info(ssock->pool, &ssock->remote_cert_info, cert);
++    tls_cert_get_chain_raw(ssock->pool, &ssock->remote_cert_info, certs, certslen);
++
++peer_out:
++    tls_last_error = ret;
++    if (cert)
++        gnutls_x509_crt_deinit(cert);
++    else
++        pj_bzero(&ssock->remote_cert_info, sizeof(pj_ssl_cert_info));
++}
++
++
++/* When handshake completed:
++ * - notify application
++ * - if handshake failed, reset SSL state
++ * - return PJ_FALSE when SSL socket instance is destroyed by application. */
++static pj_bool_t on_handshake_complete(pj_ssl_sock_t *ssock,
++                                       pj_status_t status)
++{
++    pj_bool_t ret = PJ_TRUE;
++
++    /* Cancel handshake timer */
++    if (ssock->timer.id == TIMER_HANDSHAKE_TIMEOUT) {
++        pj_timer_heap_cancel(ssock->param.timer_heap, &ssock->timer);
++        ssock->timer.id = TIMER_NONE;
++    }
++
++    /* Update certificates info on successful handshake */
++    if (status == PJ_SUCCESS)
++        tls_cert_update(ssock);
++
++    /* Accepting */
++    if (ssock->is_server) {
++        if (status != PJ_SUCCESS) {
++            /* Handshake failed in accepting, destroy our self silently. */
++
++            char errmsg[PJ_ERR_MSG_SIZE];
++            char buf[PJ_INET6_ADDRSTRLEN + 10];
++
++            pj_strerror(status, errmsg, sizeof(errmsg));
++            PJ_LOG(3, (ssock->pool->obj_name,
++                       "Handshake failed in accepting %s: %s",
++                       pj_sockaddr_print(&ssock->rem_addr, buf, sizeof(buf), 3),
++                       errmsg));
++
++            /* Workaround for ticket #985 */
++#if (defined(PJ_WIN32) && PJ_WIN32 != 0) || (defined(PJ_WIN64) && PJ_WIN64 != 0)
++            if (ssock->param.timer_heap) {
++                pj_time_val interval = {0, DELAYED_CLOSE_TIMEOUT};
++
++                tls_sock_reset(ssock);
++
++                ssock->timer.id = TIMER_CLOSE;
++                pj_time_val_normalize(&interval);
++                if (pj_timer_heap_schedule(ssock->param.timer_heap,
++                                           &ssock->timer, &interval) != 0)
++                {
++                    ssock->timer.id = TIMER_NONE;
++                    pj_ssl_sock_close(ssock);
++                }
++            } else
++#endif /* PJ_WIN32 */
++            {
++                pj_ssl_sock_close(ssock);
++            }
++
++            return PJ_FALSE;
++        }
++        /* Notify application the newly accepted SSL socket */
++        if (ssock->param.cb.on_accept_complete)
++            ret = (*ssock->param.cb.on_accept_complete)
++                      (ssock->parent, ssock, (pj_sockaddr_t*)&ssock->rem_addr,
++                       pj_sockaddr_get_len((pj_sockaddr_t*)&ssock->rem_addr));
++
++    } else { /* Connecting */
++        /* On failure, reset SSL socket state first, as app may try to
++         * reconnect in the callback. */
++        if (status != PJ_SUCCESS) {
++            /* Server disconnected us, possibly due to negotiation failure */
++            tls_sock_reset(ssock);
++        }
++        if (ssock->param.cb.on_connect_complete) {
++
++            ret = (*ssock->param.cb.on_connect_complete)(ssock, status);
++        }
++    }
++
++    return ret;
++}
++
++static write_data_t *alloc_send_data(pj_ssl_sock_t *ssock, pj_size_t len)
++{
++    send_buf_t *send_buf = &ssock->send_buf;
++    pj_size_t avail_len, skipped_len = 0;
++    char *reg1, *reg2;
++    pj_size_t reg1_len, reg2_len;
++    write_data_t *p;
++
++    /* Check buffer availability */
++    avail_len = send_buf->max_len - send_buf->len;
++    if (avail_len < len)
++        return NULL;
++
++    /* If buffer empty, reset start pointer and return it */
++    if (send_buf->len == 0) {
++        send_buf->start = send_buf->buf;
++        send_buf->len   = len;
++        p = (write_data_t*)send_buf->start;
++        goto init_send_data;
++    }
++
++    /* Free space may be wrapped/splitted into two regions, so let's
++     * analyze them if any region can hold the write data. */
++    reg1 = send_buf->start + send_buf->len;
++    if (reg1 >= send_buf->buf + send_buf->max_len)
++        reg1 -= send_buf->max_len;
++        reg1_len = send_buf->max_len - send_buf->len;
++    if (reg1 + reg1_len > send_buf->buf + send_buf->max_len) {
++        reg1_len = send_buf->buf + send_buf->max_len - reg1;
++        reg2 = send_buf->buf;
++        reg2_len = send_buf->start - send_buf->buf;
++    } else {
++        reg2 = NULL;
++        reg2_len = 0;
++    }
++
++    /* More buffer availability check, note that the write data must be in
++     * a contigue buffer. */
++    avail_len = PJ_MAX(reg1_len, reg2_len);
++    if (avail_len < len)
++    return NULL;
++
++    /* Get the data slot */
++    if (reg1_len >= len) {
++        p = (write_data_t*)reg1;
++    } else {
++        p = (write_data_t*)reg2;
++        skipped_len = reg1_len;
++    }
++
++    /* Update buffer length */
++    send_buf->len += len + skipped_len;
++
++init_send_data:
++    /* Init the new send data */
++    pj_bzero(p, sizeof(*p));
++    pj_list_init(p);
++    pj_list_push_back(&ssock->send_pending, p);
++
++    return p;
++}
++
++static void free_send_data(pj_ssl_sock_t *ssock, write_data_t *wdata)
++{
++    send_buf_t *buf = &ssock->send_buf;
++    write_data_t *spl = &ssock->send_pending;
++
++    pj_assert(!pj_list_empty(&ssock->send_pending));
++
++    /* Free slot from the buffer */
++    if (spl->next == wdata && spl->prev == wdata) {
++    /* This is the only data, reset the buffer */
++    buf->start = buf->buf;
++    buf->len = 0;
++    } else if (spl->next == wdata) {
++    /* This is the first data, shift start pointer of the buffer and
++     * adjust the buffer length.
++     */
++    buf->start = (char*)wdata->next;
++    if (wdata->next > wdata) {
++        buf->len -= ((char*)wdata->next - buf->start);
++    } else {
++        /* Overlapped */
++        pj_size_t right_len, left_len;
++        right_len = buf->buf + buf->max_len - (char*)wdata;
++        left_len  = (char*)wdata->next - buf->buf;
++        buf->len -= (right_len + left_len);
++    }
++    } else if (spl->prev == wdata) {
++    /* This is the last data, just adjust the buffer length */
++    if (wdata->prev < wdata) {
++        pj_size_t jump_len;
++        jump_len = (char*)wdata -
++               ((char*)wdata->prev + wdata->prev->record_len);
++        buf->len -= (wdata->record_len + jump_len);
++    } else {
++        /* Overlapped */
++        pj_size_t right_len, left_len;
++        right_len = buf->buf + buf->max_len -
++            ((char*)wdata->prev + wdata->prev->record_len);
++        left_len  = (char*)wdata + wdata->record_len - buf->buf;
++        buf->len -= (right_len + left_len);
++    }
++    }
++    /* For data in the middle buffer, just do nothing on the buffer. The slot
++     * will be freed later when freeing the first/last data. */
++
++    /* Remove the data from send pending list */
++    pj_list_erase(wdata);
++}
++
++#if 0
++/* Just for testing send buffer alloc/free */
++#include <pj/rand.h>
++pj_status_t pj_ssl_sock_ossl_test_send_buf(pj_pool_t *pool)
++{
++    enum { MAX_CHUNK_NUM = 20 };
++    unsigned chunk_size, chunk_cnt, i;
++    write_data_t *wdata[MAX_CHUNK_NUM] = {0};
++    pj_time_val now;
++    pj_ssl_sock_t *ssock = NULL;
++    pj_ssl_sock_param param;
++    pj_status_t status;
++
++    pj_gettimeofday(&now);
++    pj_srand((unsigned)now.sec);
++
++    pj_ssl_sock_param_default(&param);
++    status = pj_ssl_sock_create(pool, &param, &ssock);
++    if (status != PJ_SUCCESS) {
++        return status;
++    }
++
++    if (ssock->send_buf.max_len == 0) {
++        ssock->send_buf.buf = (char *)
++                              pj_pool_alloc(ssock->pool,
++                                            ssock->param.send_buffer_size);
++        ssock->send_buf.max_len = ssock->param.send_buffer_size;
++        ssock->send_buf.start = ssock->send_buf.buf;
++        ssock->send_buf.len = 0;
++    }
++
++    chunk_size = ssock->param.send_buffer_size / MAX_CHUNK_NUM / 2;
++    chunk_cnt = 0;
++    for (i = 0; i < MAX_CHUNK_NUM; i++) {
++        wdata[i] = alloc_send_data(ssock, pj_rand() % chunk_size + 321);
++        if (wdata[i])
++            chunk_cnt++;
++        else
++            break;
++    }
++
++    while (chunk_cnt) {
++        i = pj_rand() % MAX_CHUNK_NUM;
++        if (wdata[i]) {
++            free_send_data(ssock, wdata[i]);
++            wdata[i] = NULL;
++            chunk_cnt--;
++        }
++    }
++
++    if (ssock->send_buf.len != 0)
++        status = PJ_EBUG;
++
++    pj_ssl_sock_close(ssock);
++    return status;
++}
++#endif
++
++/* Flush write circular buffer to network socket. */
++static pj_status_t flush_circ_buf_output(pj_ssl_sock_t *ssock,
++                                         pj_ioqueue_op_key_t *send_key,
++                                         pj_size_t orig_len, unsigned flags)
++{
++    pj_ssize_t len;
++    write_data_t *wdata;
++    pj_size_t needed_len;
++    pj_status_t status;
++
++    pj_lock_acquire(ssock->circ_buf_output_mutex);
++
++    /* Check if there is data in the circular buffer, flush it if any */
++    if (circ_empty(&ssock->circ_buf_output)) {
++        pj_lock_release(ssock->circ_buf_output_mutex);
++
++        return PJ_SUCCESS;
++    }
++
++    len = circ_size(&ssock->circ_buf_output);
++
++    /* Calculate buffer size needed, and align it to 8 */
++    needed_len = len + sizeof(write_data_t);
++    needed_len = ((needed_len + 7) >> 3) << 3;
++
++    /* Allocate buffer for send data */
++    wdata = alloc_send_data(ssock, needed_len);
++    if (wdata == NULL) {
++        pj_lock_release(ssock->circ_buf_output_mutex);
++        return PJ_ENOMEM;
++    }
++
++    /* Copy the data and set its properties into the send data */
++    pj_ioqueue_op_key_init(&wdata->key, sizeof(pj_ioqueue_op_key_t));
++    wdata->key.user_data = wdata;
++    wdata->app_key = send_key;
++    wdata->record_len = needed_len;
++    wdata->data_len = len;
++    wdata->plain_data_len = orig_len;
++    wdata->flags = flags;
++    circ_read(&ssock->circ_buf_output, (pj_uint8_t *)&wdata->data, len);
++
++    /* Ticket #1573: Don't hold mutex while calling PJLIB socket send(). */
++    pj_lock_release(ssock->circ_buf_output_mutex);
++
++    /* Send it */
++    if (ssock->param.sock_type == pj_SOCK_STREAM()) {
++        status = pj_activesock_send(ssock->asock, &wdata->key,
++                                    wdata->data.content, &len,
++                                    flags);
++    } else {
++        status = pj_activesock_sendto(ssock->asock, &wdata->key,
++                                      wdata->data.content, &len,
++                                      flags,
++                                      (pj_sockaddr_t*)&ssock->rem_addr,
++                                      ssock->addr_len);
++    }
++
++    if (status != PJ_EPENDING) {
++        /* When the sending is not pending, remove the wdata from send
++         * pending list. */
++        pj_lock_acquire(ssock->circ_buf_output_mutex);
++        free_send_data(ssock, wdata);
++        pj_lock_release(ssock->circ_buf_output_mutex);
++    }
++
++    return status;
++}
++
++static void on_timer(pj_timer_heap_t *th, struct pj_timer_entry *te)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*)te->user_data;
++    int timer_id = te->id;
++
++    te->id = TIMER_NONE;
++
++    PJ_UNUSED_ARG(th);
++
++    switch (timer_id) {
++    case TIMER_HANDSHAKE_TIMEOUT:
++        PJ_LOG(1, (ssock->pool->obj_name, "TLS timeout after %d.%ds",
++                   ssock->param.timeout.sec, ssock->param.timeout.msec));
++
++        on_handshake_complete(ssock, PJ_ETIMEDOUT);
++        break;
++    case TIMER_CLOSE:
++        pj_ssl_sock_close(ssock);
++        break;
++    default:
++        pj_assert(!"Unknown timer");
++        break;
++    }
++}
++
++
++/* Try to perform an asynchronous handshake */
++static pj_status_t tls_try_handshake(pj_ssl_sock_t *ssock)
++{
++    int ret;
++    pj_status_t status;
++
++    /* Perform SSL handshake */
++    ret = gnutls_handshake(ssock->session);
++
++    status = flush_circ_buf_output(ssock, &ssock->handshake_op_key, 0, 0);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    if (ret == GNUTLS_E_SUCCESS) {
++        /* System are GO */
++        ssock->connection_state = TLS_STATE_ESTABLISHED;
++        status = PJ_SUCCESS;
++    } else if (!gnutls_error_is_fatal(ret)) {
++        /* Non fatal error, retry later (busy or again) */
++        status = PJ_EPENDING;
++    } else {
++        /* Fatal error invalidates session, no fallback */
++        status = PJ_EINVAL;
++    }
++
++    tls_last_error = ret;
++
++    return status;
++}
++
++
++/*
++ *******************************************************************
++ * Active socket callbacks.
++ *******************************************************************
++ */
++
++/* PJ_TRUE asks the socket to read more data, PJ_FALSE takes it off the queue */
++static pj_bool_t asock_on_data_read(pj_activesock_t *asock, void *data,
++                                    pj_size_t size, pj_status_t status,
++                                    pj_size_t *remainder)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t *)
++                           pj_activesock_get_user_data(asock);
++
++    pj_size_t app_remainder = 0;
++
++    if (data && size > 0) {
++        /* Push data into input circular buffer (for GnuTLS) */
++        pj_lock_acquire(ssock->circ_buf_input_mutex);
++        circ_write(&ssock->circ_buf_input, data, size);
++        pj_lock_release(ssock->circ_buf_input_mutex);
++    }
++
++    /* Check if SSL handshake hasn't finished yet */
++    if (ssock->connection_state == TLS_STATE_HANDSHAKING) {
++        pj_bool_t ret = PJ_TRUE;
++
++        if (status == PJ_SUCCESS)
++            status = tls_try_handshake(ssock);
++
++        /* Not pending is either success or failed */
++        if (status != PJ_EPENDING)
++            ret = on_handshake_complete(ssock, status);
++
++        return ret;
++    }
++
++    /* See if there is any decrypted data for the application */
++    if (ssock->read_started) {
++        do {
++            /* Get read data structure at the end of the data */
++            read_data_t *app_read_data = *(OFFSET_OF_READ_DATA_PTR(ssock, data));
++            int app_data_size = (int)(ssock->read_size - app_read_data->len);
++
++            /* Decrypt received data using GnuTLS (will read our input
++             * circular buffer) */
++            int decrypted_size = gnutls_record_recv(ssock->session,
++                                                    ((read_data_t *)app_read_data->data) +
++                                                    app_read_data->len,
++                                                    app_data_size);
++
++            if (decrypted_size > 0 || status != PJ_SUCCESS) {
++                if (ssock->param.cb.on_data_read) {
++                    pj_bool_t ret;
++                    app_remainder = 0;
++
++                    if (decrypted_size > 0)
++                        app_read_data->len += decrypted_size;
++
++                    ret = (*ssock->param.cb.on_data_read)(ssock,
++                                                          app_read_data->data,
++                                                          app_read_data->len,
++                                                          status,
++                                                          &app_remainder);
++
++                    if (!ret) {
++                        /* We've been destroyed */
++                        return PJ_FALSE;
++                    }
++
++                    /* Application may have left some data to be consumed
++                     * later as remainder */
++                    app_read_data->len = app_remainder;
++                }
++
++                /* Active socket signalled connection closed/error, this has
++                 * been signalled to the application along with any remaining
++                 * buffer. So, let's just reset SSL socket now.  */
++                if (status != PJ_SUCCESS) {
++                    tls_sock_reset(ssock);
++                    return PJ_FALSE;
++                }
++            } else if (decrypted_size == 0) {
++                /* Nothing more to read */
++
++                return PJ_TRUE;
++            } else if (decrypted_size == GNUTLS_E_AGAIN ||
++                       decrypted_size == GNUTLS_E_INTERRUPTED) {
++                return PJ_TRUE;
++            } else if (decrypted_size == GNUTLS_E_REHANDSHAKE) {
++                /* Seems like we are renegotiating */
++                pj_status_t try_handshake_status = tls_try_handshake(ssock);
++
++                /* Not pending is either success or failed */
++                if (try_handshake_status != PJ_EPENDING) {
++                    if (!on_handshake_complete(ssock, try_handshake_status)) {
++                        return PJ_FALSE;
++                    }
++                }
++
++                if (try_handshake_status != PJ_SUCCESS &&
++                    try_handshake_status != PJ_EPENDING) {
++                    return PJ_FALSE;
++                }
++            } else if (!gnutls_error_is_fatal(decrypted_size)) {
++                /* non-fatal error, let's just continue */
++            } else {
++                return PJ_FALSE;
++            }
++        } while (PJ_TRUE);
++    }
++
++    return PJ_TRUE;
++}
++
++
++/* Callback every time new data is available from the active socket */
++static pj_bool_t asock_on_data_sent(pj_activesock_t *asock,
++                                    pj_ioqueue_op_key_t *send_key,
++                                    pj_ssize_t sent)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t *)pj_activesock_get_user_data(asock);
++
++    PJ_UNUSED_ARG(send_key);
++    PJ_UNUSED_ARG(sent);
++
++    if (ssock->connection_state == TLS_STATE_HANDSHAKING) {
++        /* Initial handshaking */
++        pj_status_t status = tls_try_handshake(ssock);
++
++        /* Not pending is either success or failed */
++        if (status != PJ_EPENDING)
++            return on_handshake_complete(ssock, status);
++
++    } else if (send_key != &ssock->handshake_op_key) {
++        /* Some data has been sent, notify application */
++        write_data_t *wdata = (write_data_t*)send_key->user_data;
++        if (ssock->param.cb.on_data_sent) {
++            pj_bool_t ret;
++            pj_ssize_t sent_len;
++
++            sent_len = sent > 0 ? wdata->plain_data_len : sent;
++
++            ret = (*ssock->param.cb.on_data_sent)(ssock, wdata->app_key,
++                                                  sent_len);
++            if (!ret) {
++                /* We've been destroyed */
++                return PJ_FALSE;
++            }
++        }
++
++        /* Update write buffer state */
++        pj_lock_acquire(ssock->circ_buf_output_mutex);
++        free_send_data(ssock, wdata);
++        pj_lock_release(ssock->circ_buf_output_mutex);
++    } else {
++        /* SSL re-negotiation is on-progress, just do nothing */
++        /* FIXME: check if this is valid for GnuTLS too */
++    }
++
++    return PJ_TRUE;
++}
++
++
++/* Callback every time a new connection has been accepted (server) */
++static pj_bool_t asock_on_accept_complete(pj_activesock_t *asock,
++                                          pj_sock_t newsock,
++                                          const pj_sockaddr_t *src_addr,
++                                          int src_addr_len)
++{
++    pj_ssl_sock_t *ssock_parent = (pj_ssl_sock_t *)
++                                  pj_activesock_get_user_data(asock);
++
++    pj_ssl_sock_t *ssock;
++    pj_activesock_cb asock_cb;
++    pj_activesock_cfg asock_cfg;
++    unsigned int i;
++    pj_status_t status;
++
++    PJ_UNUSED_ARG(src_addr_len);
++
++    /* Create new SSL socket instance */
++    status = pj_ssl_sock_create(ssock_parent->pool, &ssock_parent->newsock_param,
++                                &ssock);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Update new SSL socket attributes */
++    ssock->sock = newsock;
++    ssock->parent = ssock_parent;
++    ssock->is_server = PJ_TRUE;
++    if (ssock_parent->cert) {
++        status = pj_ssl_sock_set_certificate(ssock, ssock->pool,
++                                             ssock_parent->cert);
++        if (status != PJ_SUCCESS)
++            goto on_return;
++    }
++
++    /* Apply QoS, if specified */
++    status = pj_sock_apply_qos2(ssock->sock, ssock->param.qos_type,
++                                &ssock->param.qos_params, 1,
++                                ssock->pool->obj_name, NULL);
++    if (status != PJ_SUCCESS && !ssock->param.qos_ignore_error)
++        goto on_return;
++
++    /* Update local address */
++    ssock->addr_len = src_addr_len;
++    status = pj_sock_getsockname(ssock->sock, &ssock->local_addr,
++                                 &ssock->addr_len);
++    if (status != PJ_SUCCESS) {
++        /* This fails on few envs, e.g: win IOCP, just tolerate this and
++         * use parent local address instead.
++         */
++        pj_sockaddr_cp(&ssock->local_addr, &ssock_parent->local_addr);
++    }
++
++    /* Set remote address */
++    pj_sockaddr_cp(&ssock->rem_addr, src_addr);
++
++    /* Create SSL context */
++    status = tls_open(ssock);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Prepare read buffer */
++    ssock->asock_rbuf = (void **)pj_pool_calloc(ssock->pool,
++                                                ssock->param.async_cnt,
++                                                sizeof(void*));
++    if (!ssock->asock_rbuf)
++        return PJ_ENOMEM;
++
++    for (i = 0; i < ssock->param.async_cnt; ++i) {
++        ssock->asock_rbuf[i] = (void *)pj_pool_alloc(
++                                            ssock->pool,
++                                            ssock->param.read_buffer_size +
++                                            sizeof(read_data_t*));
++        if (!ssock->asock_rbuf[i])
++            return PJ_ENOMEM;
++    }
++
++    /* Create active socket */
++    pj_activesock_cfg_default(&asock_cfg);
++    asock_cfg.async_cnt = ssock->param.async_cnt;
++    asock_cfg.concurrency = ssock->param.concurrency;
++    asock_cfg.whole_data = PJ_TRUE;
++
++    pj_bzero(&asock_cb, sizeof(asock_cb));
++    asock_cb.on_data_read = asock_on_data_read;
++    asock_cb.on_data_sent = asock_on_data_sent;
++
++    status = pj_activesock_create(ssock->pool,
++                                  ssock->sock,
++                                  ssock->param.sock_type,
++                                  &asock_cfg,
++                                  ssock->param.ioqueue,
++                                  &asock_cb,
++                                  ssock,
++                                  &ssock->asock);
++
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Start reading */
++    status = pj_activesock_start_read2(ssock->asock, ssock->pool,
++                                       (unsigned)ssock->param.read_buffer_size,
++                                       ssock->asock_rbuf,
++                                       PJ_IOQUEUE_ALWAYS_ASYNC);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Prepare write/send state */
++    pj_assert(ssock->send_buf.max_len == 0);
++    ssock->send_buf.buf = (char *)pj_pool_alloc(ssock->pool,
++                                                ssock->param.send_buffer_size);
++    if (!ssock->send_buf.buf)
++        return PJ_ENOMEM;
++
++    ssock->send_buf.max_len = ssock->param.send_buffer_size;
++    ssock->send_buf.start = ssock->send_buf.buf;
++    ssock->send_buf.len = 0;
++
++    /* Start handshake timer */
++    if (ssock->param.timer_heap &&
++        (ssock->param.timeout.sec != 0 || ssock->param.timeout.msec != 0)) {
++        pj_assert(ssock->timer.id == TIMER_NONE);
++        ssock->timer.id = TIMER_HANDSHAKE_TIMEOUT;
++        status = pj_timer_heap_schedule(ssock->param.timer_heap,
++                                        &ssock->timer,
++                                        &ssock->param.timeout);
++        if (status != PJ_SUCCESS)
++            ssock->timer.id = TIMER_NONE;
++    }
++
++    /* Start SSL handshake */
++    ssock->connection_state = TLS_STATE_HANDSHAKING;
++
++    status = tls_try_handshake(ssock);
++
++on_return:
++    if (ssock && status != PJ_EPENDING)
++        on_handshake_complete(ssock, status);
++
++    /* Must return PJ_TRUE whatever happened, as active socket must
++     * continue listening.
++     */
++    return PJ_TRUE;
++}
++
++
++/* Callback every time a new connection has been completed (client) */
++static pj_bool_t asock_on_connect_complete (pj_activesock_t *asock,
++                                            pj_status_t status)
++{
++    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*)
++                           pj_activesock_get_user_data(asock);
++
++    unsigned int i;
++    int ret;
++
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Update local address */
++    ssock->addr_len = sizeof(pj_sockaddr);
++    status = pj_sock_getsockname(ssock->sock, &ssock->local_addr,
++                                 &ssock->addr_len);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Create SSL context */
++    status = tls_open(ssock);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Prepare read buffer */
++    ssock->asock_rbuf = (void **)pj_pool_calloc(ssock->pool,
++                                                ssock->param.async_cnt,
++                                                sizeof(void *));
++    if (!ssock->asock_rbuf)
++        return PJ_ENOMEM;
++
++    for (i = 0; i < ssock->param.async_cnt; ++i) {
++        ssock->asock_rbuf[i] = (void *)pj_pool_alloc(
++                                            ssock->pool,
++                                            ssock->param.read_buffer_size +
++                                            sizeof(read_data_t *));
++        if (!ssock->asock_rbuf[i])
++            return PJ_ENOMEM;
++    }
++
++    /* Start read */
++    status = pj_activesock_start_read2(ssock->asock, ssock->pool,
++                                       (unsigned) ssock->param.read_buffer_size,
++                                       ssock->asock_rbuf,
++                                       PJ_IOQUEUE_ALWAYS_ASYNC);
++    if (status != PJ_SUCCESS)
++        goto on_return;
++
++    /* Prepare write/send state */
++    pj_assert(ssock->send_buf.max_len == 0);
++    ssock->send_buf.buf = (char *)pj_pool_alloc(ssock->pool,
++                                                ssock->param.send_buffer_size);
++    if (!ssock->send_buf.buf)
++        return PJ_ENOMEM;
++
++    ssock->send_buf.max_len = ssock->param.send_buffer_size;
++    ssock->send_buf.start = ssock->send_buf.buf;
++    ssock->send_buf.len = 0;
++
++    /* Set server name to connect */
++    if (ssock->param.server_name.slen) {
++        /* Server name is null terminated already */
++        ret = gnutls_server_name_set(ssock->session, GNUTLS_NAME_DNS,
++                                     ssock->param.server_name.ptr,
++                                     ssock->param.server_name.slen);
++        if (ret < 0) {
++            PJ_LOG(3, (ssock->pool->obj_name,
++                       "gnutls_server_name_set() failed: %s",
++                       gnutls_strerror(ret)));
++        }
++    }
++
++    /* Start handshake */
++    ssock->connection_state = TLS_STATE_HANDSHAKING;
++
++    status = tls_try_handshake(ssock);
++    if (status != PJ_EPENDING)
++        goto on_return;
++
++    return PJ_TRUE;
++
++on_return:
++    return on_handshake_complete(ssock, status);
++}
++
++static void tls_ciphers_fill(void)
++{
++     if (!tls_available_ciphers) {
++         tls_init();
++         tls_deinit();
++     }
++}
++
++/*
++ *******************************************************************
++ * API
++ *******************************************************************
++ */
++
++/* Load credentials from files. */
++PJ_DEF(pj_status_t) pj_ssl_cert_load_from_files(pj_pool_t *pool,
++                                                const pj_str_t *CA_file,
++                                                const pj_str_t *cert_file,
++                                                const pj_str_t *privkey_file,
++                                                const pj_str_t *privkey_pass,
++                                                pj_ssl_cert_t **p_cert)
++{
++    return pj_ssl_cert_load_from_files2(pool, CA_file, NULL, cert_file,
++                    privkey_file, privkey_pass, p_cert);
++}
++
++/* Load credentials from files. */
++PJ_DECL(pj_status_t) pj_ssl_cert_load_from_files2(
++                        pj_pool_t *pool,
++                        const pj_str_t *CA_file,
++                        const pj_str_t *CA_path,
++                        const pj_str_t *cert_file,
++                        const pj_str_t *privkey_file,
++                        const pj_str_t *privkey_pass,
++                        pj_ssl_cert_t **p_cert)
++{
++    pj_ssl_cert_t *cert;
++
++    PJ_ASSERT_RETURN(pool && (CA_file || CA_path) && cert_file &&
++             privkey_file,
++             PJ_EINVAL);
++
++    cert = PJ_POOL_ZALLOC_T(pool, pj_ssl_cert_t);
++    if (CA_file) {
++        pj_strdup_with_null(pool, &cert->CA_file, CA_file);
++    }
++    if (CA_path) {
++        pj_strdup_with_null(pool, &cert->CA_path, CA_path);
++    }
++    pj_strdup_with_null(pool, &cert->cert_file, cert_file);
++    pj_strdup_with_null(pool, &cert->privkey_file, privkey_file);
++    pj_strdup_with_null(pool, &cert->privkey_pass, privkey_pass);
++
++    *p_cert = cert;
++
++    return PJ_SUCCESS;
++}
++
++/* Store credentials. */
++PJ_DECL(pj_status_t) pj_ssl_sock_set_certificate(pj_ssl_sock_t *ssock,
++                                                 pj_pool_t *pool,
++                                                 const pj_ssl_cert_t *cert)
++{
++    pj_ssl_cert_t *cert_;
++
++    PJ_ASSERT_RETURN(ssock && pool && cert, PJ_EINVAL);
++
++    cert_ = PJ_POOL_ZALLOC_T(pool, pj_ssl_cert_t);
++    pj_memcpy(cert_, cert, sizeof(cert));
++    pj_strdup_with_null(pool, &cert_->CA_file, &cert->CA_file);
++    pj_strdup_with_null(pool, &cert_->CA_path, &cert->CA_path);
++    pj_strdup_with_null(pool, &cert_->cert_file, &cert->cert_file);
++    pj_strdup_with_null(pool, &cert_->privkey_file, &cert->privkey_file);
++    pj_strdup_with_null(pool, &cert_->privkey_pass, &cert->privkey_pass);
++
++    ssock->cert = cert_;
++
++    return PJ_SUCCESS;
++}
++
++
++/* Get available ciphers. */
++PJ_DEF(pj_status_t) pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[],
++                                                 unsigned *cipher_num)
++{
++    unsigned int i;
++
++    PJ_ASSERT_RETURN(ciphers && cipher_num, PJ_EINVAL);
++
++    tls_ciphers_fill();
++
++    if (!tls_available_ciphers) {
++        *cipher_num = 0;
++        return PJ_ENOTFOUND;
++    }
++
++    *cipher_num = PJ_MIN(*cipher_num, tls_available_ciphers);
++
++    for (i = 0; i < *cipher_num; ++i)
++        ciphers[i] = tls_ciphers[i].id;
++
++    return PJ_SUCCESS;
++}
++
++
++/* Get cipher name string. */
++PJ_DEF(const char *)pj_ssl_cipher_name(pj_ssl_cipher cipher)
++{
++    unsigned int i;
++
++    tls_ciphers_fill();
++
++    for (i = 0; i < tls_available_ciphers; ++i) {
++        if (cipher == tls_ciphers[i].id)
++            return tls_ciphers[i].name;
++    }
++
++    return NULL;
++}
++
++
++/* Get cipher identifier. */
++PJ_DEF(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name)
++{
++    unsigned int i;
++
++    tls_ciphers_fill();
++
++    for (i = 0; i < tls_available_ciphers; ++i) {
++        if (!pj_ansi_stricmp(tls_ciphers[i].name, cipher_name))
++            return tls_ciphers[i].id;
++    }
++
++    return PJ_TLS_UNKNOWN_CIPHER;
++}
++
++
++/* Check if the specified cipher is supported by the TLS backend. */
++PJ_DEF(pj_bool_t) pj_ssl_cipher_is_supported(pj_ssl_cipher cipher)
++{
++    unsigned int i;
++
++    tls_ciphers_fill();
++
++    for (i = 0; i < tls_available_ciphers; ++i) {
++        if (cipher == tls_ciphers[i].id)
++            return PJ_TRUE;
++    }
++
++    return PJ_FALSE;
++}
++
++/* Create SSL socket instance. */
++PJ_DEF(pj_status_t) pj_ssl_sock_create(pj_pool_t *pool,
++                                       const pj_ssl_sock_param *param,
++                                       pj_ssl_sock_t **p_ssock)
++{
++    pj_ssl_sock_t *ssock;
++    pj_status_t status;
++
++    PJ_ASSERT_RETURN(pool && param && p_ssock, PJ_EINVAL);
++    PJ_ASSERT_RETURN(param->sock_type == pj_SOCK_STREAM(), PJ_ENOTSUP);
++
++    pool = pj_pool_create(pool->factory, "tls%p", 512, 512, NULL);
++
++    /* Create secure socket */
++    ssock = PJ_POOL_ZALLOC_T(pool, pj_ssl_sock_t);
++    ssock->pool = pool;
++    ssock->sock = PJ_INVALID_SOCKET;
++    ssock->connection_state = TLS_STATE_NULL;
++    pj_list_init(&ssock->write_pending);
++    pj_list_init(&ssock->write_pending_empty);
++    pj_list_init(&ssock->send_pending);
++    pj_timer_entry_init(&ssock->timer, 0, ssock, &on_timer);
++    pj_ioqueue_op_key_init(&ssock->handshake_op_key,
++                           sizeof(pj_ioqueue_op_key_t));
++
++    /* Create secure socket mutex */
++    status = pj_lock_create_recursive_mutex(pool, pool->obj_name,
++                                            &ssock->circ_buf_output_mutex);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Create input circular buffer mutex */
++    status = pj_lock_create_simple_mutex(pool, pool->obj_name,
++                                         &ssock->circ_buf_input_mutex);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Create output circular buffer mutex */
++    status = pj_lock_create_simple_mutex(pool, pool->obj_name,
++                                         &ssock->circ_buf_output_mutex);
++    if (status != PJ_SUCCESS)
++        return status;
++
++    /* Init secure socket param */
++    ssock->param = *param;
++    ssock->param.read_buffer_size = ((ssock->param.read_buffer_size + 7) >> 3) << 3;
++
++    if (param->ciphers_num > 0) {
++        unsigned int i;
++        ssock->param.ciphers = (pj_ssl_cipher *)
++                               pj_pool_calloc(pool, param->ciphers_num,
++                                              sizeof(pj_ssl_cipher));
++        if (!ssock->param.ciphers)
++            return PJ_ENOMEM;
++
++        for (i = 0; i < param->ciphers_num; ++i)
++            ssock->param.ciphers[i] = param->ciphers[i];
++    }
++
++    /* Server name must be null-terminated */
++    pj_strdup_with_null(pool, &ssock->param.server_name, &param->server_name);
++
++    /* Finally */
++    *p_ssock = ssock;
++
++    return PJ_SUCCESS;
++}
++
++
++/*
++ * Close the secure socket. This will unregister the socket from the
++ * ioqueue and ultimately close the socket.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_close(pj_ssl_sock_t *ssock)
++{
++    pj_pool_t *pool;
++
++    PJ_ASSERT_RETURN(ssock, PJ_EINVAL);
++
++    if (!ssock->pool)
++        return PJ_SUCCESS;
++
++    if (ssock->timer.id != TIMER_NONE) {
++        pj_timer_heap_cancel(ssock->param.timer_heap, &ssock->timer);
++        ssock->timer.id = TIMER_NONE;
++    }
++
++    tls_sock_reset(ssock);
++
++    pj_lock_destroy(ssock->circ_buf_output_mutex);
++    pj_lock_destroy(ssock->circ_buf_input_mutex);
++
++    pool = ssock->pool;
++    ssock->pool = NULL;
++    if (pool)
++        pj_pool_release(pool);
++
++    return PJ_SUCCESS;
++}
++
++
++/* Associate arbitrary data with the secure socket. */
++PJ_DEF(pj_status_t) pj_ssl_sock_set_user_data(pj_ssl_sock_t *ssock,
++                                              void *user_data)
++{
++    PJ_ASSERT_RETURN(ssock, PJ_EINVAL);
++
++    ssock->param.user_data = user_data;
++    return PJ_SUCCESS;
++}
++
++
++/* Retrieve the user data previously associated with this secure socket. */
++PJ_DEF(void *)pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock)
++{
++    PJ_ASSERT_RETURN(ssock, NULL);
++
++    return ssock->param.user_data;
++}
++
++
++/* Retrieve the local address and port used by specified SSL socket. */
++PJ_DEF(pj_status_t) pj_ssl_sock_get_info (pj_ssl_sock_t *ssock,
++                                          pj_ssl_sock_info *info)
++{
++    pj_bzero(info, sizeof(*info));
++
++    /* Established flag */
++    info->established = (ssock->connection_state == TLS_STATE_ESTABLISHED);
++
++    /* Protocol */
++    info->proto = ssock->param.proto;
++
++    /* Local address */
++    pj_sockaddr_cp(&info->local_addr, &ssock->local_addr);
++
++    if (info->established) {
++        int i;
++        gnutls_cipher_algorithm_t lookup;
++        gnutls_cipher_algorithm_t cipher;
++
++        /* Current cipher */
++        cipher = gnutls_cipher_get(ssock->session);
++        for (i = 0; ; i++) {
++            unsigned char id[2];
++            const char *suite = gnutls_cipher_suite_info(i, (unsigned char *)id,
++                                                         NULL, &lookup, NULL,
++                                                         NULL);
++            if (suite) {
++                if (lookup == cipher) {
++                    info->cipher = (pj_uint32_t) ((id[0] << 8) | id[1]);
++                    break;
++                }
++            } else
++                break;
++        }
++
++        /* Remote address */
++        pj_sockaddr_cp(&info->remote_addr, &ssock->rem_addr);
++
++        /* Certificates info */
++        info->local_cert_info = &ssock->local_cert_info;
++        info->remote_cert_info = &ssock->remote_cert_info;
++
++        /* Verification status */
++        info->verify_status = ssock->verify_status;
++    }
++
++    /* Last known GnuTLS error code */
++    info->last_native_err = ssock->last_err;
++
++    return PJ_SUCCESS;
++}
++
++
++/* Starts read operation on this secure socket. */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_read(pj_ssl_sock_t *ssock,
++                                           pj_pool_t *pool,
++                                           unsigned buff_size,
++                                           pj_uint32_t flags)
++{
++    void **readbuf;
++    unsigned int i;
++
++    PJ_ASSERT_RETURN(ssock && pool && buff_size, PJ_EINVAL);
++    PJ_ASSERT_RETURN(ssock->connection_state == TLS_STATE_ESTABLISHED,
++                     PJ_EINVALIDOP);
++
++    readbuf = (void**) pj_pool_calloc(pool, ssock->param.async_cnt,
++                                      sizeof(void *));
++    if (!readbuf)
++        return PJ_ENOMEM;
++
++    for (i = 0; i < ssock->param.async_cnt; ++i) {
++        readbuf[i] = pj_pool_alloc(pool, buff_size);
++        if (!readbuf[i])
++            return PJ_ENOMEM;
++    }
++
++    return pj_ssl_sock_start_read2(ssock, pool, buff_size, readbuf, flags);
++}
++
++
++/*
++ * Same as #pj_ssl_sock_start_read(), except that the application
++ * supplies the buffers for the read operation so that the acive socket
++ * does not have to allocate the buffers.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_read2 (pj_ssl_sock_t *ssock,
++                                             pj_pool_t *pool,
++                                             unsigned buff_size,
++                                             void *readbuf[],
++                                             pj_uint32_t flags)
++{
++    unsigned int i;
++
++    PJ_ASSERT_RETURN(ssock && pool && buff_size && readbuf, PJ_EINVAL);
++    PJ_ASSERT_RETURN(ssock->connection_state == TLS_STATE_ESTABLISHED,
++                     PJ_EINVALIDOP);
++
++    /* Create SSL socket read buffer */
++    ssock->ssock_rbuf = (read_data_t*)pj_pool_calloc(pool,
++                                                     ssock->param.async_cnt,
++                                                     sizeof(read_data_t));
++    if (!ssock->ssock_rbuf)
++        return PJ_ENOMEM;
++
++    /* Store SSL socket read buffer pointer in the activesock read buffer */
++    for (i = 0; i < ssock->param.async_cnt; ++i) {
++        read_data_t **p_ssock_rbuf =
++                        OFFSET_OF_READ_DATA_PTR(ssock, ssock->asock_rbuf[i]);
++
++        ssock->ssock_rbuf[i].data = readbuf[i];
++        ssock->ssock_rbuf[i].len = 0;
++
++        *p_ssock_rbuf = &ssock->ssock_rbuf[i];
++    }
++
++    ssock->read_size = buff_size;
++    ssock->read_started = PJ_TRUE;
++    ssock->read_flags = flags;
++
++    return PJ_SUCCESS;
++}
++
++
++/*
++ * Same as pj_ssl_sock_start_read(), except that this function is used
++ * only for datagram sockets, and it will trigger \a on_data_recvfrom()
++ * callback instead.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_recvfrom (pj_ssl_sock_t *ssock,
++                                                pj_pool_t *pool,
++                                                unsigned buff_size,
++                                                pj_uint32_t flags)
++{
++    PJ_UNUSED_ARG(ssock);
++    PJ_UNUSED_ARG(pool);
++    PJ_UNUSED_ARG(buff_size);
++    PJ_UNUSED_ARG(flags);
++
++    return PJ_ENOTSUP;
++}
++
++
++/*
++ * Same as #pj_ssl_sock_start_recvfrom() except that the recvfrom()
++ * operation takes the buffer from the argument rather than creating
++ * new ones.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_recvfrom2 (pj_ssl_sock_t *ssock,
++                                                 pj_pool_t *pool,
++                                                 unsigned buff_size,
++                                                 void *readbuf[],
++                                                 pj_uint32_t flags)
++{
++    PJ_UNUSED_ARG(ssock);
++    PJ_UNUSED_ARG(pool);
++    PJ_UNUSED_ARG(buff_size);
++    PJ_UNUSED_ARG(readbuf);
++    PJ_UNUSED_ARG(flags);
++
++    return PJ_ENOTSUP;
++}
++
++
++/*
++ * Write the plain data to GnuTLS, it will be encrypted by gnutls_record_send()
++ * and sent via tls_data_push. Note that re-negotitation may be on progress, so
++ * sending data should be delayed until re-negotiation is completed.
++ */
++static pj_status_t tls_write(pj_ssl_sock_t *ssock,
++                             pj_ioqueue_op_key_t *send_key,
++                             const void *data, pj_ssize_t size, unsigned flags)
++{
++    pj_status_t status;
++    int nwritten;
++    pj_ssize_t total_written = 0;
++
++    /* Ask GnuTLS to encrypt our plaintext now. GnuTLS will use the push
++     * callback to actually write the encrypted bytes into our output circular
++     * buffer. GnuTLS may refuse to "send" everything at once, but since we are
++     * not really sending now, we will just call it again now until it succeeds
++     * (or fails in a fatal way). */
++    while (total_written < size) {
++        /* Try encrypting using GnuTLS */
++        nwritten = gnutls_record_send(ssock->session, ((read_data_t *)data) + total_written,
++                                      size);
++
++        if (nwritten > 0) {
++            /* Good, some data was encrypted and written */
++            total_written += nwritten;
++        } else {
++            /* Normally we would have to retry record_send but our internal
++             * state has not changed, so we have to ask for more data first.
++             * We will just try again later, although this should never happen.
++             */
++            return tls_status_from_err(ssock, nwritten);
++        }
++    }
++
++    /* All encrypted data is written to the output circular buffer;
++     * now send it on the socket (or notify problem). */
++    if (total_written == size)
++        status = flush_circ_buf_output(ssock, send_key, size, flags);
++    else
++        status = PJ_ENOMEM;
++
++    return status;
++}
++
++
++/* Flush delayed data sending in the write pending list. */
++static pj_status_t flush_delayed_send(pj_ssl_sock_t *ssock)
++{
++    /* Check for another ongoing flush */
++    if (ssock->flushing_write_pend) {
++        return PJ_EBUSY;
++    }
++
++    pj_lock_acquire(ssock->circ_buf_output_mutex);
++
++    /* Again, check for another ongoing flush */
++    if (ssock->flushing_write_pend) {
++        pj_lock_release(ssock->circ_buf_output_mutex);
++        return PJ_EBUSY;
++    }
++
++    /* Set ongoing flush flag */
++    ssock->flushing_write_pend = PJ_TRUE;
++
++    while (!pj_list_empty(&ssock->write_pending)) {
++        write_data_t *wp;
++        pj_status_t status;
++
++        wp = ssock->write_pending.next;
++
++        /* Ticket #1573: Don't hold mutex while calling socket send. */
++        pj_lock_release(ssock->circ_buf_output_mutex);
++
++        status = tls_write(ssock, &wp->key, wp->data.ptr,
++                           wp->plain_data_len, wp->flags);
++        if (status != PJ_SUCCESS) {
++            /* Reset ongoing flush flag first. */
++            ssock->flushing_write_pend = PJ_FALSE;
++            return status;
++        }
++
++        pj_lock_acquire(ssock->circ_buf_output_mutex);
++        pj_list_erase(wp);
++        pj_list_push_back(&ssock->write_pending_empty, wp);
++    }
++
++    /* Reset ongoing flush flag */
++    ssock->flushing_write_pend = PJ_FALSE;
++
++    pj_lock_release(ssock->circ_buf_output_mutex);
++
++    return PJ_SUCCESS;
++}
++
++
++/* Sending is delayed, push back the sending data into pending list. */
++static pj_status_t delay_send(pj_ssl_sock_t *ssock,
++                              pj_ioqueue_op_key_t *send_key,
++                              const void *data, pj_ssize_t size,
++                              unsigned flags)
++{
++    write_data_t *wp;
++
++    pj_lock_acquire(ssock->circ_buf_output_mutex);
++
++    /* Init write pending instance */
++    if (!pj_list_empty(&ssock->write_pending_empty)) {
++        wp = ssock->write_pending_empty.next;
++        pj_list_erase(wp);
++    } else {
++        wp = PJ_POOL_ZALLOC_T(ssock->pool, write_data_t);
++    }
++
++    wp->app_key = send_key;
++    wp->plain_data_len = size;
++    wp->data.ptr = data;
++    wp->flags = flags;
++
++    pj_list_push_back(&ssock->write_pending, wp);
++
++    pj_lock_release(ssock->circ_buf_output_mutex);
++
++    /* Must return PJ_EPENDING */
++    return PJ_EPENDING;
++}
++
++
++/**
++ * Send data using the socket.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_send(pj_ssl_sock_t *ssock,
++                                     pj_ioqueue_op_key_t *send_key,
++                                     const void *data, pj_ssize_t *size,
++                                     unsigned flags)
++{
++    pj_status_t status;
++
++    PJ_ASSERT_RETURN(ssock && data && size && (*size > 0), PJ_EINVAL);
++    PJ_ASSERT_RETURN(ssock->connection_state==TLS_STATE_ESTABLISHED,
++                     PJ_EINVALIDOP);
++
++    /* Flush delayed send first. Sending data might be delayed when
++     * re-negotiation is on-progress. */
++    status = flush_delayed_send(ssock);
++    if (status == PJ_EBUSY) {
++        /* Re-negotiation or flushing is on progress, delay sending */
++        status = delay_send(ssock, send_key, data, *size, flags);
++        goto on_return;
++    } else if (status != PJ_SUCCESS) {
++        goto on_return;
++    }
++
++    /* Write data to SSL */
++    status = tls_write(ssock, send_key, data, *size, flags);
++    if (status == PJ_EBUSY) {
++        /* Re-negotiation is on progress, delay sending */
++        status = delay_send(ssock, send_key, data, *size, flags);
++    }
++
++on_return:
++    return status;
++}
++
++
++/**
++ * Send datagram using the socket.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_sendto (pj_ssl_sock_t *ssock,
++                                        pj_ioqueue_op_key_t *send_key,
++                                        const void *data, pj_ssize_t *size,
++                                        unsigned flags,
++                                        const pj_sockaddr_t *addr, int addr_len)
++{
++    PJ_UNUSED_ARG(ssock);
++    PJ_UNUSED_ARG(send_key);
++    PJ_UNUSED_ARG(data);
++    PJ_UNUSED_ARG(size);
++    PJ_UNUSED_ARG(flags);
++    PJ_UNUSED_ARG(addr);
++    PJ_UNUSED_ARG(addr_len);
++
++    return PJ_ENOTSUP;
++}
++
++/**
++ * Starts asynchronous socket accept() operations on this secure socket.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_accept (pj_ssl_sock_t *ssock,
++                          pj_pool_t *pool,
++                          const pj_sockaddr_t *localaddr,
++                          int addr_len)
++{
++    return pj_ssl_sock_start_accept2(ssock, pool, localaddr, addr_len,
++                         &ssock->param);
++}
++
++/**
++ * Starts asynchronous socket accept() operations on this secure socket.
++ */
++PJ_DEF(pj_status_t) pj_ssl_sock_start_accept2 (pj_ssl_sock_t *ssock,
++                                              pj_pool_t *pool,
++                                              const pj_sockaddr_t *localaddr,
++                                              int addr_len,
++                                              const pj_ssl_sock_param *newsock_param)
++{
++    pj_activesock_cb asock_cb;
++    pj_activesock_cfg asock_cfg;
++    pj_status_t status;
++
++    PJ_ASSERT_RETURN(ssock && pool && localaddr && addr_len, PJ_EINVAL);
++
++    /* Verify new socket parameters */
++    if (newsock_param->grp_lock != ssock->param.grp_lock ||
++        newsock_param->sock_af != ssock->param.sock_af ||
++        newsock_param->sock_type != ssock->param.sock_type)
++    {
++        return PJ_EINVAL;
++    }
++
++    /* Create socket */
++    status = pj_sock_socket(ssock->param.sock_af, ssock->param.sock_type, 0,
++                            &ssock->sock);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Apply SO_REUSEADDR */
++    if (ssock->param.reuse_addr) {
++        int enabled = 1;
++        status = pj_sock_setsockopt(ssock->sock, pj_SOL_SOCKET(),
++                                    pj_SO_REUSEADDR(),
++                                    &enabled, sizeof(enabled));
++        if (status != PJ_SUCCESS) {
++            PJ_PERROR(4,(ssock->pool->obj_name, status,
++                         "Warning: error applying SO_REUSEADDR"));
++        }
++    }
++
++    /* Apply QoS, if specified */
++    status = pj_sock_apply_qos2(ssock->sock, ssock->param.qos_type,
++                                &ssock->param.qos_params, 2,
++                                ssock->pool->obj_name, NULL);
++    if (status != PJ_SUCCESS && !ssock->param.qos_ignore_error)
++        goto on_error;
++
++    /* Bind socket */
++    status = pj_sock_bind(ssock->sock, localaddr, addr_len);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Start listening to the address */
++    status = pj_sock_listen(ssock->sock, PJ_SOMAXCONN);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Create active socket */
++    pj_activesock_cfg_default(&asock_cfg);
++    asock_cfg.async_cnt = ssock->param.async_cnt;
++    asock_cfg.concurrency = ssock->param.concurrency;
++    asock_cfg.whole_data = PJ_TRUE;
++
++    pj_bzero(&asock_cb, sizeof(asock_cb));
++    asock_cb.on_accept_complete = asock_on_accept_complete;
++
++    status = pj_activesock_create(pool,
++                                  ssock->sock,
++                                  ssock->param.sock_type,
++                                  &asock_cfg,
++                                  ssock->param.ioqueue,
++                                  &asock_cb,
++                                  ssock,
++                                  &ssock->asock);
++
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Start accepting */
++    pj_ssl_sock_param_copy(pool, &ssock->newsock_param, newsock_param);
++    status = pj_activesock_start_accept(ssock->asock, pool);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Update local address */
++    ssock->addr_len = addr_len;
++    status = pj_sock_getsockname(ssock->sock, &ssock->local_addr,
++                                 &ssock->addr_len);
++    if (status != PJ_SUCCESS)
++        pj_sockaddr_cp(&ssock->local_addr, localaddr);
++
++    ssock->is_server = PJ_TRUE;
++
++    return PJ_SUCCESS;
++
++on_error:
++    tls_sock_reset(ssock);
++    return status;
++}
++
++
++/**
++ * Starts asynchronous socket connect() operation.
++ */
++PJ_DECL(pj_status_t) pj_ssl_sock_start_connect(pj_ssl_sock_t *ssock,
++                                               pj_pool_t *pool,
++                                               const pj_sockaddr_t *localaddr,
++                                               const pj_sockaddr_t *remaddr,
++                                               int addr_len)
++{
++    pj_activesock_cb asock_cb;
++    pj_activesock_cfg asock_cfg;
++    pj_status_t status;
++
++    PJ_ASSERT_RETURN(ssock && pool && localaddr && remaddr && addr_len,
++                     PJ_EINVAL);
++
++    /* Create socket */
++    status = pj_sock_socket(ssock->param.sock_af, ssock->param.sock_type, 0,
++                            &ssock->sock);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Apply QoS, if specified */
++    status = pj_sock_apply_qos2(ssock->sock, ssock->param.qos_type,
++                                &ssock->param.qos_params, 2,
++                                ssock->pool->obj_name, NULL);
++    if (status != PJ_SUCCESS && !ssock->param.qos_ignore_error)
++        goto on_error;
++
++    /* Bind socket */
++    status = pj_sock_bind(ssock->sock, localaddr, addr_len);
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Create active socket */
++    pj_activesock_cfg_default(&asock_cfg);
++    asock_cfg.async_cnt = ssock->param.async_cnt;
++    asock_cfg.concurrency = ssock->param.concurrency;
++    asock_cfg.whole_data = PJ_TRUE;
++
++    pj_bzero(&asock_cb, sizeof(asock_cb));
++    asock_cb.on_connect_complete = asock_on_connect_complete;
++    asock_cb.on_data_read = asock_on_data_read;
++    asock_cb.on_data_sent = asock_on_data_sent;
++
++    status = pj_activesock_create(pool,
++                                  ssock->sock,
++                                  ssock->param.sock_type,
++                                  &asock_cfg,
++                                  ssock->param.ioqueue,
++                                  &asock_cb,
++                                  ssock,
++                                  &ssock->asock);
++
++    if (status != PJ_SUCCESS)
++        goto on_error;
++
++    /* Save remote address */
++    pj_sockaddr_cp(&ssock->rem_addr, remaddr);
++
++    /* Start timer */
++    if (ssock->param.timer_heap &&
++        (ssock->param.timeout.sec != 0 || ssock->param.timeout.msec != 0))
++    {
++        pj_assert(ssock->timer.id == TIMER_NONE);
++        ssock->timer.id = TIMER_HANDSHAKE_TIMEOUT;
++        status = pj_timer_heap_schedule(ssock->param.timer_heap,
++                                        &ssock->timer,
++                                        &ssock->param.timeout);
++        if (status != PJ_SUCCESS)
++            ssock->timer.id = TIMER_NONE;
++    }
++
++    status = pj_activesock_start_connect(ssock->asock, pool, remaddr,
++                                         addr_len);
++
++    if (status == PJ_SUCCESS)
++        asock_on_connect_complete(ssock->asock, PJ_SUCCESS);
++    else if (status != PJ_EPENDING)
++        goto on_error;
++
++    /* Update local address */
++    ssock->addr_len = addr_len;
++    status = pj_sock_getsockname(ssock->sock, &ssock->local_addr,
++                                 &ssock->addr_len);
++    /* Note that we may not get an IP address here. This can
++     * happen for example on Windows, where getsockname()
++     * would return 0.0.0.0 if socket has just started the
++     * async connect. In this case, just leave the local
++     * address with 0.0.0.0 for now; it will be updated
++     * once the socket is established.
++     */
++
++    /* Update socket state */
++    ssock->is_server = PJ_FALSE;
++
++    return PJ_EPENDING;
++
++on_error:
++    tls_sock_reset(ssock);
++    return status;
++}
++
++
++PJ_DEF(pj_status_t) pj_ssl_sock_renegotiate(pj_ssl_sock_t *ssock)
++{
++    int status;
++
++    /* Nothing established yet */
++    PJ_ASSERT_RETURN(ssock->connection_state == TLS_STATE_ESTABLISHED,
++                     PJ_EINVALIDOP);
++
++    /* Cannot renegotiate; we're a client */
++    /* FIXME: in fact maybe that's not true */
++    PJ_ASSERT_RETURN(!ssock->is_server, PJ_EINVALIDOP);
++
++    /* First call gnutls_rehandshake() to see if this is even possible */
++    status = gnutls_rehandshake(ssock->session);
++
++    if (status == GNUTLS_E_SUCCESS) {
++        /* Rehandshake is possible, so try a GnuTLS handshake now. The eventual
++         * gnutls_record_recv() calls could return a few specific values during
++         * this state:
++         *
++         *   - GNUTLS_E_REHANDSHAKE: rehandshake message processing
++         *   - GNUTLS_E_WARNING_ALERT_RECEIVED: client does not wish to
++         *                                      renegotiate
++         */
++        ssock->connection_state = TLS_STATE_HANDSHAKING;
++        status = tls_try_handshake(ssock);
++
++        return status;
++    } else {
++        return tls_status_from_err(ssock, status);
++    }
++}
++
++#endif /* PJ_HAS_SSL_SOCK */
+--- a/pjlib/src/pj/ssl_sock_ossl.c
++++ b/pjlib/src/pj/ssl_sock_ossl.c
+@@ -32,8 +32,10 @@
+ #include <pj/timer.h>
+ 
+ 
+-/* Only build when PJ_HAS_SSL_SOCK is enabled */
+-#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK!=0
++/* Only build when PJ_HAS_SSL_SOCK is enabled and when PJ_HAS_TLS_SOCK is
++ * disabled (meaning GnuTLS is off) */
++#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
++    defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 0
+ 
+ #define THIS_FILE		"ssl_sock_ossl.c"
+ 
+--- a/pjmedia/src/pjmedia/transport_srtp.c
++++ b/pjmedia/src/pjmedia/transport_srtp.c
+@@ -30,7 +30,8 @@
+ 
+ #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
+ 
+-#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0)
++#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
++    defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 0
+ #  include <openssl/rand.h>
+ 
+ /* Suppress compile warning of OpenSSL deprecation (OpenSSL is deprecated
+@@ -1113,7 +1114,8 @@ static pj_status_t generate_crypto_attr_value(pj_pool_t *pool,
+ 	    key_ok = PJ_TRUE;
+ 
+ 
+-#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0)
++#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
++    defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 0
+ 
+ /* Include OpenSSL libraries for MSVC */
+ #  ifdef _MSC_VER
diff --git a/contrib/src/pjproject/pj_uwp_multiple_listeners.patch b/contrib/src/pjproject/pj_uwp_multiple_listeners.patch
new file mode 100644
index 0000000000000000000000000000000000000000..893bcfbdca8bdaca50c7044a42407e65ef1cc38c
--- /dev/null
+++ b/contrib/src/pjproject/pj_uwp_multiple_listeners.patch
@@ -0,0 +1,64 @@
+--- a/pjsip/src/pjsip/sip_transport.c
++++ b/pjsip/src/pjsip/sip_transport.c
+@@ -1248,22 +1248,22 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_register_tpfactory( pjsip_tpmgr *mgr,
+ 
+     pj_lock_acquire(mgr->lock);
+ 
+-    /* Check that no factory with the same type has been registered. */
++    /* Check that no factory with the same type and bound address has been registered. */
+     status = PJ_SUCCESS;
+     for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) {
+-	if (p->type == tpf->type) {
+-	    status = PJSIP_ETYPEEXISTS;
+-	    break;
+-	}
+-	if (p == tpf) {
+-	    status = PJ_EEXISTS;
+-	    break;
+-	}
++        if (p->type == tpf->type && !pj_sockaddr_cmp(&tpf->local_addr, &p->local_addr)) {
++            status = PJSIP_ETYPEEXISTS;
++            break;
++        }
++        if (p == tpf) {
++            status = PJ_EEXISTS;
++            break;
++        }
+     }
+ 
+     if (status != PJ_SUCCESS) {
+-	pj_lock_release(mgr->lock);
+-	return status;
++        pj_lock_release(mgr->lock);
++        return status;
+     }
+ 
+     pj_list_insert_before(&mgr->factory_list, tpf);
+@@ -2047,13 +2047,11 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,
+ 	pj_memcpy(&key.rem_addr, remote, addr_len);
+ 
+ 	transport = (pjsip_transport*)
+-		    pj_hash_get(mgr->table, &key, key_len, NULL);
+-
++    pj_hash_get(mgr->table, &key, key_len, NULL);
++    unsigned flag = pjsip_transport_get_flag_from_type(type);
+ 	if (transport == NULL) {
+-	    unsigned flag = pjsip_transport_get_flag_from_type(type);
+ 	    const pj_sockaddr *remote_addr = (const pj_sockaddr*)remote;
+ 
+-
+ 	    /* Ignore address for loop transports. */
+ 	    if (type == PJSIP_TRANSPORT_LOOP ||
+ 		     type == PJSIP_TRANSPORT_LOOP_DGRAM)
+@@ -2135,6 +2135,11 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,
+ 	    }
+ 
+ 	} else {
++        /* Make sure we don't use another factory than the one given if secure flag is set */
++        if (flag & PJSIP_TRANSPORT_SECURE) {
++            TRACE_((THIS_FILE, "Can't create new TLS transport with no provided suitable TLS listener."));
++            return PJSIP_ETPNOTSUITABLE;
++        }
+ 
+ 	    /* Find factory with type matches the destination type */
+ 	    factory = mgr->factory_list.next;
diff --git a/contrib/src/portaudio/fetch_and_patch.bat b/contrib/src/portaudio/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..94a9cd832e070f614050f1ac2f9e9616f4c3eb3f
--- /dev/null
+++ b/contrib/src/portaudio/fetch_and_patch.bat
@@ -0,0 +1,15 @@
+set BUILD=%SRC%..\build
+
+set PA_VERSION=v190600_20161030
+set PA_URL="http://www.portaudio.com/archives/pa_stable_%PA_VERSION%.tgz"
+
+mkdir %BUILD%
+wget %PA_URL%
+7z -y e pa_stable_%PA_VERSION%.tgz && 7z -y x pa_stable_%PA_VERSION%.tar -o%BUILD%
+del pa_stable_%PA_VERSION%.tgz && del pa_stable_%PA_VERSION%.tar
+
+cd %BUILD%\portaudio
+
+git apply --reject --whitespace=fix %SRC%\portaudio\pa-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/portaudio/pa-uwp.patch b/contrib/src/portaudio/pa-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..8af3a14bc7e04b236360474e0f81683148fcb88c
--- /dev/null
+++ b/contrib/src/portaudio/pa-uwp.patch
@@ -0,0 +1,1468 @@
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,42 +1,249 @@
+-# Compiled Object files
+-*.slo
+-*.lo
+-*.o
+-*.obj
++## Ignore Visual Studio temporary files, build results, and
++## files generated by popular Visual Studio add-ons.
++
++#output directories
++DebugLib/
++Debug/
++ReleaseLib/
++Release/
++.config/
++# User-specific files
++*.suo
++*.user
++*.userosscache
++*.sln.docstates
++*.VC.VC.opendb
++*.VC.db
++*.db
++*.filters
++
++# User-specific files (MonoDevelop/Xamarin Studio)
++*.userprefs
++
++# Build results
++[Dd]ebug/
++[Dd]ebugPublic/
++[Rr]elease/
++[Rr]eleases/
++x64/
++x86/
++bld/
++[Bb]in/
++[Oo]bj/
++
++# Visual Studio 2015 cache/options directory
++.vs/
++# Uncomment if you have tasks that create the project's static files in wwwroot
++#wwwroot/
+ 
+-# annoying files
+-**/.DS_Store
+-
+-# Generated by configure and make
+-Makefile
+-bin-stamp
+-bin/*
+-config.log
+-config.status
+-lib-stamp
+-lib/*
+-libtool
+-portaudio-2.0.pc
+-
+-# Precompiled Headers
+-*.gch
++# MSTest test Results
++[Tt]est[Rr]esult*/
++[Bb]uild[Ll]og.*
++
++# NUNIT
++*.VisualState.xml
++TestResult.xml
++
++# Build Results of an ATL Project
++[Dd]ebugPS/
++[Rr]eleasePS/
++dlldata.c
++
++# DNX
++project.lock.json
++artifacts/
++
++#*_i.c
++#*_p.c
++#*_i.h
++*.ilk
++*.meta
++*.obj
++*.o
+ *.pch
++*.pdb
++*.pgc
++*.pgd
++*.rsp
++*.sbr
++*.tlb
++*.tli
++*.tlh
++*.tmp
++*.tmp_proj
++*.log
++*.vspscc
++*.vssscc
++.builds
++*.pidb
++*.svclog
++*.scc
++
++# Chutzpah Test files
++_Chutzpah*
++
++# Visual C++ cache files
++ipch/
++*.aps
++*.ncb
++*.opendb
++*.opensdf
++*.sdf
++*.cachefile
++
++# Visual Studio profiler
++*.psess
++*.vsp
++*.vspx
++*.sap
++
++# TFS 2012 Local Workspace
++$tf/
++
++# Guidance Automation Toolkit
++*.gpState
++
++# ReSharper is a .NET coding add-in
++_ReSharper*/
++*.[Rr]e[Ss]harper
++*.DotSettings.user
++
++# JustCode is a .NET coding add-in
++.JustCode
++
++# TeamCity is a build add-in
++_TeamCity*
++
++# DotCover is a Code Coverage Tool
++*.dotCover
++
++# NCrunch
++_NCrunch_*
++.*crunch*.local.xml
++nCrunchTemp_*
++
++# MightyMoose
++*.mm.*
++AutoTest.Net/
++
++# Web workbench (sass)
++.sass-cache/
++
++# Installshield output folder
++[Ee]xpress/
++
++# DocProject is a documentation generator add-in
++DocProject/buildhelp/
++DocProject/Help/*.HxT
++DocProject/Help/*.HxC
++DocProject/Help/*.hhc
++DocProject/Help/*.hhk
++DocProject/Help/*.hhp
++DocProject/Help/Html2
++DocProject/Help/html
++
++# Click-Once directory
++publish/
++
++# Publish Web Output
++*.[Pp]ublish.xml
++*.azurePubxml
++# TODO: Comment the next line if you want to checkin your web deploy settings 
++# but database connection strings (with potential passwords) will be unencrypted
++*.pubxml
++*.publishproj
++
++# NuGet Packages
++*.nupkg
++# The packages folder can be ignored because of Package Restore
++**/packages/*
++# except build/, which is used as an MSBuild target.
++!**/packages/build/
++# Uncomment if necessary however generally it will be regenerated when needed
++#!**/packages/repositories.config
++# NuGet v3's project.json files produces more ignoreable files
++*.nuget.props
++*.nuget.targets
++
++# Microsoft Azure Build Output
++csx/
++*.build.csdef
++
++# Microsoft Azure Emulator
++ecf/
++rcf/
++
++# Microsoft Azure ApplicationInsights config file
++ApplicationInsights.config
++
++# Windows Store app package directory
++AppPackages/
++BundleArtifacts/
++
++# Visual Studio cache files
++# files ending in .cache can be ignored
++*.[Cc]ache
++# but keep track of directories ending in .cache
++!*.[Cc]ache/
++
++# Others
++ClientBin/
++~$*
++*~
++*.dbmdl
++*.dbproj.schemaview
++*.pfx
++*.publishsettings
++node_modules/
++orleans.codegen.cs
++
++# RIA/Silverlight projects
++Generated_Code/
++
++# Backup & report files from converting an old project file
++# to a newer Visual Studio version. Backup files are not needed,
++# because we have git ;-)
++_UpgradeReport_Files/
++Backup*/
++UpgradeLog*.XML
++UpgradeLog*.htm
++
++# SQL Server files
++*.mdf
++*.ldf
++
++# Business Intelligence projects
++*.rdl.data
++*.bim.layout
++*.bim_*.settings
++
++# Microsoft Fakes
++FakesAssemblies/
++
++# GhostDoc plugin setting file
++*.GhostDoc.xml
++
++# Node.js Tools for Visual Studio
++.ntvs_analysis.dat
++
++# Visual Studio 6 build log
++*.plg
++
++# Visual Studio 6 workspace options file
++*.opt
+ 
+-# Compiled Dynamic libraries
+-*.so
+-*.dylib
+-*.dll
++# Visual Studio LightSwitch build output
++**/*.HTMLClient/GeneratedArtifacts
++**/*.DesktopClient/GeneratedArtifacts
++**/*.DesktopClient/ModelManifest.xml
++**/*.Server/GeneratedArtifacts
++**/*.Server/ModelManifest.xml
++_Pvt_Extensions
+ 
+-# Fortran module files
+-*.mod
++# Paket dependency manager
++.paket/paket.exe
+ 
+-# Compiled Static libraries
+-*.lai
+-*.la
+-*.a
+-*.lib
++# FAKE - F# Make
++.fake/
+ 
+-# Executables
+-*.exe
+-*.out
+-*.app
++!config.h
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/portaudio-UWP/pch.cpp
+@@ -0,0 +1 @@
++#include "pch.h"
+--- /dev/null
++++ b/MSVC/portaudio-UWP/pch.h
+@@ -0,0 +1,9 @@
++#pragma once
++
++#include "targetver.h"
++
++#ifndef WIN32_LEAN_AND_MEAN
++#define WIN32_LEAN_AND_MEAN
++#endif
++
++#include <windows.h>
+--- /dev/null
++++ b/MSVC/portaudio-UWP/portaudio-UWP.cpp
+@@ -0,0 +1,2 @@
++#include "pch.h"
++#include "portaudio-UWP.h"
+--- /dev/null
++++ b/MSVC/portaudio-UWP/portaudio-UWP.h
+@@ -0,0 +1 @@
++#pragma once
+--- /dev/null
++++ b/MSVC/portaudio-UWP/portaudio-UWP.vcxproj
+@@ -0,0 +1,252 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|ARM">
++      <Configuration>Debug</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|ARM">
++      <Configuration>Release</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{23913386-5333-4c93-b3f0-0227aff77b49}</ProjectGuid>
++    <Keyword>StaticLibrary</Keyword>
++    <RootNamespace>portaudio_UWP</RootNamespace>
++    <DefaultLanguage>en-US</DefaultLanguage>
++    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
++    <AppContainerApplication>true</AppContainerApplication>
++    <ApplicationType>Windows Store</ApplicationType>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
++    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <GenerateManifest>false</GenerateManifest>
++    <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\include;$(ProjectDir)..\..\src\common;$(ProjectDir)..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <DisableSpecificWarnings>4005;</DisableSpecificWarnings>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\include
++xcopy /S /Y $(ProjectDir)..\..\include\*.h $(ProjectDir)..\..\..\include
++mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++copy $(OutDir)*.lib $(ProjectDir)..\..\..\lib\x64
++copy $(OutDir)*.pdb $(ProjectDir)..\..\..\lib\x64</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClInclude Include="portaudio-UWP.h" />
++    <ClInclude Include="pch.h" />
++    <ClInclude Include="targetver.h" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\src\common\pa_allocation.c" />
++    <ClCompile Include="..\..\src\common\pa_converters.c" />
++    <ClCompile Include="..\..\src\common\pa_cpuload.c" />
++    <ClCompile Include="..\..\src\common\pa_debugprint.c" />
++    <ClCompile Include="..\..\src\common\pa_dither.c" />
++    <ClCompile Include="..\..\src\common\pa_front.c" />
++    <ClCompile Include="..\..\src\common\pa_process.c" />
++    <ClCompile Include="..\..\src\common\pa_ringbuffer.c" />
++    <ClCompile Include="..\..\src\common\pa_stream.c" />
++    <ClCompile Include="..\..\src\common\pa_trace.c" />
++    <ClCompile Include="..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c" />
++    <ClCompile Include="..\..\src\hostapi\wasapi\pa_win_wasapi.c" />
++    <ClCompile Include="..\..\src\os\win\pa_win_coinitialize.c" />
++    <ClCompile Include="..\..\src\os\win\pa_win_hostapis.c" />
++    <ClCompile Include="..\..\src\os\win\pa_win_util.c" />
++    <ClCompile Include="..\..\src\os\win\pa_win_waveformat.c" />
++    <ClCompile Include="..\..\src\os\win\pa_win_wdmks_utils.c">
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
++      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
++    </ClCompile>
++    <ClCompile Include="..\..\src\os\win\pa_x86_plain_converters.c" />
++    <ClCompile Include="portaudio-UWP.cpp" />
++    <ClCompile Include="pch.cpp">
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
++      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
++    </ClCompile>
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/portaudio-UWP/targetver.h
+@@ -0,0 +1,8 @@
++#pragma once
++
++// Including SDKDDKVer.h defines the highest available Windows platform.
++
++// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
++// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
++
++#include <SDKDDKVer.h>
+--- /dev/null
++++ b/MSVC/portaudio.def
+@@ -0,0 +1,46 @@
++EXPORTS
++
++;
++Pa_GetVersion                       @1
++Pa_GetVersionText                   @2
++Pa_GetErrorText                     @3                 
++Pa_Initialize                       @4
++Pa_Terminate                        @5
++Pa_GetHostApiCount                  @6
++Pa_GetDefaultHostApi                @7
++Pa_GetHostApiInfo                   @8
++Pa_HostApiTypeIdToHostApiIndex      @9
++Pa_HostApiDeviceIndexToDeviceIndex  @10
++Pa_GetLastHostErrorInfo             @11
++Pa_GetDeviceCount                   @12
++Pa_GetDefaultInputDevice            @13
++Pa_GetDefaultOutputDevice           @14
++Pa_GetDeviceInfo                    @15
++Pa_IsFormatSupported                @16
++Pa_OpenStream                       @17
++Pa_OpenDefaultStream                @18
++Pa_CloseStream                      @19
++Pa_SetStreamFinishedCallback        @20
++Pa_StartStream                      @21
++Pa_StopStream                       @22
++Pa_AbortStream                      @23
++Pa_IsStreamStopped                  @24
++Pa_IsStreamActive                   @25
++Pa_GetStreamInfo                    @26
++Pa_GetStreamTime                    @27
++Pa_GetStreamCpuLoad                 @28
++Pa_ReadStream                       @29
++Pa_WriteStream                      @30
++Pa_GetStreamReadAvailable           @31
++Pa_GetStreamWriteAvailable          @32
++Pa_GetSampleSize                    @33
++Pa_Sleep                            @34
++PaUtil_InitializeX86PlainConverters @52
++PaUtil_SetDebugPrintFunction        @55
++PaWasapi_GetDeviceDefaultFormat     @56
++PaWasapi_GetDeviceRole              @57
++PaWasapi_ThreadPriorityBoost        @58
++PaWasapi_ThreadPriorityRevert       @59
++PaWasapi_GetFramesPerHostBuffer     @60
++PaWasapi_GetJackDescription         @61
++PaWasapi_GetJackCount               @62
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/portaudio.sln
+@@ -0,0 +1,52 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25420.1
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio-UWP", "portaudio-UWP\portaudio-UWP.vcxproj", "{23913386-5333-4C93-B3F0-0227AFF77B49}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|ARM = Debug|ARM
++		Debug|Win32 = Debug|Win32
++		Debug|x64 = Debug|x64
++		DebugLib|ARM = DebugLib|ARM
++		DebugLib|Win32 = DebugLib|Win32
++		DebugLib|x64 = DebugLib|x64
++		Release|ARM = Release|ARM
++		Release|Win32 = Release|Win32
++		Release|x64 = Release|x64
++		ReleaseLib|ARM = ReleaseLib|ARM
++		ReleaseLib|Win32 = ReleaseLib|Win32
++		ReleaseLib|x64 = ReleaseLib|x64
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|ARM.ActiveCfg = Debug|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|ARM.Build.0 = Debug|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|Win32.ActiveCfg = Debug|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|Win32.Build.0 = Debug|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|x64.ActiveCfg = Debug|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Debug|x64.Build.0 = Debug|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|ARM.ActiveCfg = Debug|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|ARM.Build.0 = Debug|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|Win32.ActiveCfg = Debug|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|Win32.Build.0 = Debug|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|x64.ActiveCfg = Debug|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.DebugLib|x64.Build.0 = Debug|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|ARM.ActiveCfg = Release|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|ARM.Build.0 = Release|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|Win32.ActiveCfg = Release|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|Win32.Build.0 = Release|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|x64.ActiveCfg = Release|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.Release|x64.Build.0 = Release|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|ARM.ActiveCfg = Release|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|ARM.Build.0 = Release|ARM
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|Win32.ActiveCfg = Release|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|Win32.Build.0 = Release|Win32
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|x64.ActiveCfg = Release|x64
++		{23913386-5333-4C93-B3F0-0227AFF77B49}.ReleaseLib|x64.Build.0 = Release|x64
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/portaudio.vcxproj
+@@ -0,0 +1,608 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="DebugLib|Win32">
++      <Configuration>DebugLib</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugLib|x64">
++      <Configuration>DebugLib</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseLib|Win32">
++      <Configuration>ReleaseLib</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseLib|x64">
++      <Configuration>ReleaseLib</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{0A18A071-125E-442F-AFF7-A3F68ABECF99}</ProjectGuid>
++    <RootNamespace>portaudio</RootNamespace>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup>
++    <_ProjectFileVersion>14.0.25123.0</_ProjectFileVersion>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <OutDir>$(SolutionDir)..\..\bin\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|Win32'">
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetExt>.lib</TargetExt>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|x64'">
++    <OutDir>$(ProjectDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetExt>.lib</TargetExt>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <OutDir>$(SolutionDir)..\..\bin\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>true</LinkIncremental>
++    <TargetExt>.dll</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|Win32'">
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>true</LinkIncremental>
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(SolutionDir)..\..\bin\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>true</LinkIncremental>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|x64'">
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir>$(Platform)\$(Configuration)\</IntDir>
++    <LinkIncremental>true</LinkIncremental>
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <ProgramDatabaseFile>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++      <AdditionalLibraryDirectories>$(WindowsSdkDir)\Lib\winv6.3\km\$(PlatformTarget)\</AdditionalLibraryDirectories>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName>
++      </HeaderFileName>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;NDEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <ProgramDatabaseFile>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++      <AdditionalLibraryDirectories>$(WindowsSdkDir)\Lib\winv6.3\km\$(PlatformTarget)\</AdditionalLibraryDirectories>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\include
++xcopy /S /Y $(ProjectDir)..\include\*.h $(ProjectDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLib|x64'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName>
++      </HeaderFileName>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;NDEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(Platform)\$(Configuration)/portaudio_x64.lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\include
++xcopy /S /Y $(ProjectDir)..\include\*.h $(ProjectDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;WIN32;_DEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=1;PA_USE_WMME=0;PA_USE_WASAPI=0;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
++      <DisableSpecificWarnings>4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++      <AdditionalLibraryDirectories>
++      </AdditionalLibraryDirectories>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName>
++      </HeaderFileName>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;WIN32;_DEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=1;PA_USE_WMME=0;PA_USE_WASAPI=0;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
++      <DisableSpecificWarnings>4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(SolutionDir)..\..\lib\$(PlatformTarget)\$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++      <AdditionalLibraryDirectories>
++      </AdditionalLibraryDirectories>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)/portaudio_x64.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugLib|x64'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
++      <HeaderFileName>
++      </HeaderFileName>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
++      <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
++      <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
++      <ProgramDataBaseFileName>$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0409</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>ksguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
++      <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x64.lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(Platform)\$(Configuration)/portaudio_x64.bsc</OutputFile>
++    </Bscmake>
++    <Lib>
++      <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClCompile Include="..\src\common\pa_allocation.c" />
++    <ClCompile Include="..\src\common\pa_converters.c" />
++    <ClCompile Include="..\src\common\pa_cpuload.c" />
++    <ClCompile Include="..\src\common\pa_debugprint.c" />
++    <ClCompile Include="..\src\common\pa_dither.c" />
++    <ClCompile Include="..\src\common\pa_front.c" />
++    <ClCompile Include="..\src\common\pa_process.c" />
++    <ClCompile Include="..\src\common\pa_ringbuffer.c" />
++    <ClCompile Include="..\src\common\pa_stream.c" />
++    <ClCompile Include="..\src\common\pa_trace.c" />
++    <ClCompile Include="..\src\hostapi\dsound\pa_win_ds.c" />
++    <ClCompile Include="..\src\hostapi\dsound\pa_win_ds_dynlink.c" />
++    <ClCompile Include="..\src\hostapi\skeleton\pa_hostapi_skeleton.c" />
++    <ClCompile Include="..\src\hostapi\wasapi\pa_win_wasapi.c" />
++    <ClCompile Include="..\src\hostapi\wdmks\pa_win_wdmks.c" />
++    <ClCompile Include="..\src\hostapi\wmme\pa_win_wmme.c" />
++    <ClCompile Include="..\src\os\win\pa_win_coinitialize.c" />
++    <ClCompile Include="..\src\os\win\pa_win_hostapis.c" />
++    <ClCompile Include="..\src\os\win\pa_win_util.c" />
++    <ClCompile Include="..\src\os\win\pa_win_waveformat.c" />
++    <ClCompile Include="..\src\os\win\pa_win_wdmks_utils.c" />
++    <ClCompile Include="..\src\os\win\pa_x86_plain_converters.c" />
++  </ItemGroup>
++  <ItemGroup>
++    <None Include="portaudio.def" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\include\pa_asio.h" />
++    <ClInclude Include="..\include\pa_win_ds.h" />
++    <ClInclude Include="..\include\pa_win_wasapi.h" />
++    <ClInclude Include="..\include\pa_win_waveformat.h" />
++    <ClInclude Include="..\include\pa_win_wmme.h" />
++    <ClInclude Include="..\include\portaudio.h" />
++    <ClInclude Include="..\src\common\pa_gitrevision.h" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/readme.txt
+@@ -0,0 +1,112 @@
++Hello
++
++  This is a small list of steps in order to build portaudio
++(Currently v19-devel) into a VS2005 DLL and lib file.
++This DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS)
++
++1)Copy the source dirs that comes with the ASIO SDK inside src\hostapi\asio\ASIOSDK
++  so you should now have example:
++  
++  portaudio19svn\src\hostapi\asio\ASIOSDK\common
++  portaudio19svn\src\hostapi\asio\ASIOSDK\host
++  portaudio19svn\src\hostapi\asio\ASIOSDK\host\sample
++  portaudio19svn\src\hostapi\asio\ASIOSDK\host\pc
++  portaudio19svn\src\hostapi\asio\ASIOSDK\host\mac (not needed)
++  
++  You dont need "driver"
++
++  To build without ASIO (or another Host API) see the "Building without ASIO support" section below.
++  
++2)
++  *If you have Visual Studio 6.0*, please make sure you have it updated with the latest (and final)
++  microsoft libraries for it, namely:
++  
++  Service pack 5:         
++     Latest known URL:  
++     http://msdn2.microsoft.com/en-us/vstudio/aa718363.aspx 
++	 Yes there EXISTS a service pack 6 , but the processor pack (below) isnt compatible with it.
++	 
++  Processor Pack(only works with above SP5)
++     Latest known URL:
++     http://msdn2.microsoft.com/en-us/vstudio/Aa718349.aspx
++	 This isn't absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.
++	 Up to you to decide upon Service pack 5 or 6 depending on your need for intrinsics.
++
++  Platform SDK (Feb 2003) : 
++     Latest known URL:  
++     http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
++	 (This will allow your code base to be x64 friendly, with correct defines 
++	 for LONG_PTR and such)
++	 NOTE A) Yes you have to use IE activex scripts to install that - wont work in Firefox, you 
++	 may have to temporarily change tyour default browser(aint life unfair)
++	 NOTE B) Dont forget to hit "Register PSDK Directories with Visual Studio". 
++	 you can make sure its right in VC6 if you open tools/options/directories/include files and you see SDK 2003 as the FIRST entry
++	 (it must be the same for libs)
++  
++  DirectX 9.0 SDK Update - (Summer 2003)
++    Latest known URL:
++    http://www.microsoft.com/downloads/details.aspx?familyid=9216652f-51e0-402e-b7b5-feb68d00f298&displaylang=en
++    Again register the links in VC6, and check inside vc6 if headers are in second place right after SDk 2003
++	
++  *If you have 7.0(VC.NET/2001) or 7.1(VC.2003) *
++  then I suggest you open portaudio.dsp (and convert if needed)
++ 
++  *If you have Visual Studio 2005 * (or later), I suggest you open the portaudio.sln file
++  which contains 2 projects (portaudio & portaudio_static) each with 6 configurations: Win32/x64 in both Debug, Release and ReleaseMinDependency,
++  last of which removes dependency of all but basic OS system DLLs.
++
++  hit compile and hope for the best.
++ 
++3)Now in any  project, in which you require portaudio,
++  you can just link with portaudio_x86.lib, (or _x64) and of course include the 
++  relevant headers
++  (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) See (*)
++  
++4) Your new exe should now use portaudio_xXX.dll.
++
++
++Have fun!
++
++(*): you may want to add/remove some DLL entry points.
++Right now those 6 entries are _not_ from portaudio.h
++
++(from portaudio.def)
++(...)
++PaAsio_GetAvailableLatencyValues    @50
++PaAsio_ShowControlPanel             @51
++PaUtil_InitializeX86PlainConverters @52
++PaAsio_GetInputChannelName          @53
++PaAsio_GetOutputChannelName         @54
++PaUtil_SetLogPrintFunction          @55
++
++
++*** Building without ASIO support ***
++
++To build PortAudio without ASIO support you need to:
++  A. Make sure your project doesn't try to build any ASIO SDK files.
++     If you're using one of the shipped projects, remove the ASIO related files 
++     from the project.
++
++  B. Make sure your project doesn't try to build the PortAudio ASIO
++     implementation files:
++	      src/hostapi/pa_asio.cpp
++        src/hostapi/iasiothiscallresolver.cpp
++     If you're using one of the shipped projects remove them from the project.
++
++  C. Set the PA_USE_ASIO preprocessor symbol to zero (i.e. PA_USE_ASIO=0) in the project properties.
++     In VS2005 this can be added under
++     Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions
++
++     Setting PA_USE_ASIO=0 stops src/os/win/pa_win_hostapis.c 
++     from trying to initialize the PA ASIO implementation.
++
++  D. Remove PaAsio_* entry points from portaudio.def, or comment them out with ;
++
++
++A similar procedure can be used to omit any of the other host APIs from the 
++build. The relevant preprocessor symbols used by pa_win_hostapis.c are:
++PA_USE_WMME, PA_USE_DSOUND, PA_USE_ASIO, PA_USE_WASAPI and PA_USE_WDMKS
++
++-----
++David Viens, davidv@plogue.com
++Robert Bielik, robert@xponaut.se
+--- a/src/common/pa_front.c
++++ b/src/common/pa_front.c
+@@ -390,8 +390,7 @@ PaError Pa_Terminate( void )
+ 
+     if( PA_IS_INITIALISED_ )
+     {
+-        // leave initializationCount_>0 so that Pa_CloseStream() can execute
+-        if( initializationCount_ == 1 )
++        if( --initializationCount_ == 0 )
+         {
+             CloseOpenStreams();
+ 
+@@ -399,7 +398,6 @@ PaError Pa_Terminate( void )
+ 
+             PaUtil_DumpTraceMessages();
+         }
+-        --initializationCount_;
+         result = paNoError;
+     }
+     else
+--- a/src/hostapi/wasapi/pa_win_wasapi.c
++++ b/src/hostapi/wasapi/pa_win_wasapi.c
+@@ -252,7 +252,7 @@ typedef struct _pa_AudioClientProperties {
+ #endif // __IAudioClient2_INTERFACE_DEFINED__
+ 
+ /* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */
+-#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)
++#if !defined(__CYGWIN__) && !defined(_WIN32_WCE) && !defined(PA_WINRT)
+ 	#define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
+ 	#define PA_THREAD_FUNC static unsigned WINAPI
+ 	#define PA_THREAD_ID unsigned
+@@ -1355,14 +1355,18 @@ static HRESULT ActivateAudioInterface_WINRT(const PaWasapiDeviceInfo *deviceInfo
+ 	PaActivateAudioInterfaceCompletionHandler *handlerImpl = (PaActivateAudioInterfaceCompletionHandler *)handler;
+ 	OLECHAR devicePath[PA_WASAPI_DEVICE_PATH_LEN] = { 0 };
+ 
++    const GUID guid1 = { 0xe6327cad, 0xdcec, 0x4949, 0xae, 0x8a, 0x99, 0x1e, 0x97, 0x6a, 0x79, 0xd2 };
++    const GUID guid2 = { 0x2eef81be, 0x33fa, 0x4800, 0x96, 0x70, 0x1c, 0xd4, 0x74, 0x97, 0x2c, 0x3f };
+ 	// Get device path in form L"{DEVICE_GUID}"
+ 	switch (deviceInfo->flow)
+ 	{
+ 	case eRender:
+-		StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
++		//StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
++        StringFromGUID2(&guid1, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
+ 		break;
+ 	case eCapture:
+-		StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
++		//StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
++        StringFromGUID2(&guid2, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
+ 		break;
+ 	default:
+ 		return S_FALSE;
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/pthreads/fetch_and_patch.bat b/contrib/src/pthreads/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..780a4e060530989827efaf231c2736823675736a
--- /dev/null
+++ b/contrib/src/pthreads/fetch_and_patch.bat
@@ -0,0 +1,16 @@
+set BUILD=%SRC%..\build
+
+set PTHREADS_URL="ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip"
+
+mkdir %BUILD%
+wget %PTHREADS_URL%
+7z -y x pthreads-w32-2-9-1-release.zip -o%BUILD%
+del pthreads-w32-2-9-1-release.zip
+rmdir /Q /S %BUILD%\QueueUserAPCEx && rmdir /Q /S %BUILD%\Pre-built.2
+rename %BUILD%\pthreads.2 pthreads
+
+cd %BUILD%\pthreads
+
+git apply --reject --whitespace=fix %SRC%\pthreads\pthreads-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/pthreads/pthreads-uwp.patch b/contrib/src/pthreads/pthreads-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..5f17c190fd9a0dbb4e6f0a39deaa6ecfd04e4cf4
--- /dev/null
+++ b/contrib/src/pthreads/pthreads-uwp.patch
@@ -0,0 +1,588 @@
+--- /dev/null
++++ b/.gitignore
+@@ -0,0 +1,256 @@
++## Ignore Visual Studio temporary files, build results, and
++## files generated by popular Visual Studio add-ons.
++
++#output directories
++DebugLib/
++Debug/
++ReleaseLib/
++Release/
++.config/
++# User-specific files
++*.suo
++*.user
++*.userosscache
++*.sln.docstates
++*.VC.VC.opendb
++*.VC.db
++*.db
++*.idb
++*.filters
++*.exe
++*.lib
++*.bsc
++*.tlog
++*.o
++
++# User-specific files (MonoDevelop/Xamarin Studio)
++*.userprefs
++
++# Build results
++[Dd]ebug/
++[Dd]ebugPublic/
++[Rr]elease/
++[Rr]eleases/
++x64/
++x86/
++bld/
++[Bb]in/
++[Oo]bj/
++output/
++Win32/
++
++# Visual Studio 2015 cache/options directory
++.vs/
++# Uncomment if you have tasks that create the project's static files in wwwroot
++#wwwroot/
++
++# MSTest test Results
++[Tt]est[Rr]esult*/
++[Bb]uild[Ll]og.*
++
++# NUNIT
++*.VisualState.xml
++TestResult.xml
++
++# Build Results of an ATL Project
++[Dd]ebugPS/
++[Rr]eleasePS/
++dlldata.c
++
++# DNX
++project.lock.json
++artifacts/
++
++#*_i.c
++#*_p.c
++#*_i.h
++*.ilk
++*.meta
++*.obj
++*.pch
++*.pdb
++*.pgc
++*.pgd
++*.rsp
++*.sbr
++*.tlb
++*.tli
++*.tlh
++*.tmp
++*.tmp_proj
++*.log
++*.vspscc
++*.vssscc
++.builds
++*.pidb
++*.svclog
++*.scc
++
++# Chutzpah Test files
++_Chutzpah*
++
++# Visual C++ cache files
++ipch/
++*.aps
++*.ncb
++*.opendb
++*.opensdf
++*.sdf
++*.cachefile
++
++# Visual Studio profiler
++*.psess
++*.vsp
++*.vspx
++*.sap
++
++# TFS 2012 Local Workspace
++$tf/
++
++# Guidance Automation Toolkit
++*.gpState
++
++# ReSharper is a .NET coding add-in
++_ReSharper*/
++*.[Rr]e[Ss]harper
++*.DotSettings.user
++
++# JustCode is a .NET coding add-in
++.JustCode
++
++# TeamCity is a build add-in
++_TeamCity*
++
++# DotCover is a Code Coverage Tool
++*.dotCover
++
++# NCrunch
++_NCrunch_*
++.*crunch*.local.xml
++nCrunchTemp_*
++
++# MightyMoose
++*.mm.*
++AutoTest.Net/
++
++# Web workbench (sass)
++.sass-cache/
++
++# Installshield output folder
++[Ee]xpress/
++
++# DocProject is a documentation generator add-in
++DocProject/buildhelp/
++DocProject/Help/*.HxT
++DocProject/Help/*.HxC
++DocProject/Help/*.hhc
++DocProject/Help/*.hhk
++DocProject/Help/*.hhp
++DocProject/Help/Html2
++DocProject/Help/html
++
++# Click-Once directory
++publish/
++
++# Publish Web Output
++*.[Pp]ublish.xml
++*.azurePubxml
++# TODO: Comment the next line if you want to checkin your web deploy settings 
++# but database connection strings (with potential passwords) will be unencrypted
++*.pubxml
++*.publishproj
++
++# NuGet Packages
++*.nupkg
++# The packages folder can be ignored because of Package Restore
++**/packages/*
++# except build/, which is used as an MSBuild target.
++!**/packages/build/
++# Uncomment if necessary however generally it will be regenerated when needed
++#!**/packages/repositories.config
++# NuGet v3's project.json files produces more ignoreable files
++*.nuget.props
++*.nuget.targets
++
++# Microsoft Azure Build Output
++csx/
++*.build.csdef
++
++# Microsoft Azure Emulator
++ecf/
++rcf/
++
++# Microsoft Azure ApplicationInsights config file
++ApplicationInsights.config
++
++# Windows Store app package directory
++AppPackages/
++BundleArtifacts/
++
++# Visual Studio cache files
++# files ending in .cache can be ignored
++*.[Cc]ache
++# but keep track of directories ending in .cache
++!*.[Cc]ache/
++
++# Others
++ClientBin/
++~$*
++*~
++*.dbmdl
++*.dbproj.schemaview
++*.pfx
++*.publishsettings
++node_modules/
++orleans.codegen.cs
++
++# RIA/Silverlight projects
++Generated_Code/
++
++# Backup & report files from converting an old project file
++# to a newer Visual Studio version. Backup files are not needed,
++# because we have git ;-)
++_UpgradeReport_Files/
++Backup*/
++UpgradeLog*.XML
++UpgradeLog*.htm
++
++# SQL Server files
++*.mdf
++*.ldf
++
++# Business Intelligence projects
++*.rdl.data
++*.bim.layout
++*.bim_*.settings
++
++# Microsoft Fakes
++FakesAssemblies/
++
++# GhostDoc plugin setting file
++*.GhostDoc.xml
++
++# Node.js Tools for Visual Studio
++.ntvs_analysis.dat
++
++# Visual Studio 6 build log
++*.plg
++
++# Visual Studio 6 workspace options file
++*.opt
++
++# Visual Studio LightSwitch build output
++**/*.HTMLClient/GeneratedArtifacts
++**/*.DesktopClient/GeneratedArtifacts
++**/*.DesktopClient/ModelManifest.xml
++**/*.Server/GeneratedArtifacts
++**/*.Server/ModelManifest.xml
++_Pvt_Extensions
++
++# Paket dependency manager
++.paket/paket.exe
++
++# FAKE - F# Make
++.fake/
++
++!config.h
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pch.cpp
+@@ -0,0 +1 @@
++#include "pch.h"
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pch.h
+@@ -0,0 +1,9 @@
++#pragma once
++
++#include "targetver.h"
++
++#ifndef WIN32_LEAN_AND_MEAN
++#define WIN32_LEAN_AND_MEAN
++#endif
++
++#include <windows.h>
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pthreads-UWP-S.cpp
+@@ -0,0 +1,2 @@
++#include "pch.h"
++#include "pthreads-UWP-S.h"
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pthreads-UWP-S.h
+@@ -0,0 +1 @@
++#pragma once
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pthreads-UWP-S.sln
+@@ -0,0 +1,34 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25420.1
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads-UWP-S", "pthreads-UWP-S.vcxproj", "{EA0E0510-749F-47B2-9F53-565CB4893771}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|ARM = Debug|ARM
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		Release|ARM = Release|ARM
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|ARM.ActiveCfg = Debug|ARM
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|ARM.Build.0 = Debug|ARM
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|x64.ActiveCfg = Debug|x64
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|x64.Build.0 = Debug|x64
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|x86.ActiveCfg = Debug|Win32
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Debug|x86.Build.0 = Debug|Win32
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|ARM.ActiveCfg = Release|ARM
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|ARM.Build.0 = Release|ARM
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|x64.ActiveCfg = Release|x64
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|x64.Build.0 = Release|x64
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|x86.ActiveCfg = Release|Win32
++		{EA0E0510-749F-47B2-9F53-565CB4893771}.Release|x86.Build.0 = Release|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/pthreads-UWP-S.vcxproj
+@@ -0,0 +1,216 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|ARM">
++      <Configuration>Debug</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|ARM">
++      <Configuration>Release</Configuration>
++      <Platform>ARM</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{ea0e0510-749f-47b2-9f53-565cb4893771}</ProjectGuid>
++    <Keyword>StaticLibrary</Keyword>
++    <RootNamespace>pthreads_UWP_S</RootNamespace>
++    <DefaultLanguage>en-US</DefaultLanguage>
++    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
++    <AppContainerApplication>true</AppContainerApplication>
++    <ApplicationType>Windows Store</ApplicationType>
++    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
++    <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <GenerateManifest>false</GenerateManifest>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <GenerateManifest>false</GenerateManifest>
++    <TargetName>pthreads-UWP</TargetName>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <CompileAsWinRT>false</CompileAsWinRT>
++      <SDLCheck>true</SDLCheck>
++      <PreprocessorDefinitions>_WIN32_WINNT=0x0A00;PTW32_STATIC_LIB;NEED_PROCESS_AFFINITY_MASK;HAVE_STRUCT_TIMESPEC;__CLEANUP_C;WIN32;NDEBUG;_WINDOWS;PTW32_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <ProgramDataBaseFileName>$(OutDir)pthreads-UWP.pdb</ProgramDataBaseFileName>
++    </ClCompile>
++    <Link>
++      <SubSystem>Console</SubSystem>
++      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
++      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\include
++xcopy /S /Y $(ProjectDir)..\..\sched.h $(ProjectDir)..\..\..\include
++xcopy /S /Y $(ProjectDir)..\..\semaphore.h $(ProjectDir)..\..\..\include
++xcopy /S /Y $(ProjectDir)..\..\pthread.h $(ProjectDir)..\..\..\include
++mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++xcopy /S /Y $(OutDir)pthreads-UWP.lib $(ProjectDir)..\..\..\lib\x64
++xcopy /S /Y $(OutDir)pthreads-UWP.pdb $(ProjectDir)..\..\..\lib\x64</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\implement.h" />
++    <ClInclude Include="..\..\pthread.h" />
++    <ClInclude Include="..\..\sched.h" />
++    <ClInclude Include="..\..\semaphore.h" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\pthread.c" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/pthreads-UWP-S/targetver.h
+@@ -0,0 +1,8 @@
++#pragma once
++
++// Including SDKDDKVer.h defines the highest available Windows platform.
++
++// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
++// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
++
++#include <SDKDDKVer.h>
+--- a/pthread_cancel.c
++++ b/pthread_cancel.c
+@@ -62,12 +62,14 @@ ptw32_cancel_callback (ULONG_PTR unused)
+ DWORD
+ ptw32_RegisterCancelation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2)
+ {
++#if (_WIN32_WINNT < 0x0A00)
+   CONTEXT context;
+ 
+   context.ContextFlags = CONTEXT_CONTROL;
+   GetThreadContext (threadH, &context);
+   PTW32_PROGCTR (context) = (DWORD_PTR) ptw32_cancel_self;
+   SetThreadContext (threadH, &context);
++#endif // (_WIN32_WINNT >= 0x0A00)
+   return 0;
+ }
+ 
+--- a/pthread_win32_attach_detach_np.c
++++ b/pthread_win32_attach_detach_np.c
+@@ -80,11 +80,13 @@ pthread_win32_process_attach_np ()
+   }
+ #else
+   /* strncat is secure - this is just to avoid a warning */
++#if (_WIN32_WINNT < 0x0A00)
+   if(GetSystemDirectory(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf)) &&
+      0 == strncat_s(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf), "\\QUSEREX.DLL", 12))
+   {
+     ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf);
+   }
++#endif // (_WIN32_WINNT >= 0x0A00)
+ #endif
+ 
+   if (ptw32_h_quserex != NULL)
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/restbed/asio-uwp.patch b/contrib/src/restbed/asio-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..7bd416b78e9cc0cb0d5c066a78f866dcfc91cf18
--- /dev/null
+++ b/contrib/src/restbed/asio-uwp.patch
@@ -0,0 +1,68 @@
+--- a/asio/include/asio/detail/impl/win_iocp_io_context.ipp
++++ b/asio/include/asio/detail/impl/win_iocp_io_context.ipp
+@@ -93,7 +93,7 @@ void win_iocp_io_context::shutdown()
+   {
+     LARGE_INTEGER timeout;
+     timeout.QuadPart = 1;
+-    ::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
++    //::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
+   }
+ 
+   while (::InterlockedExchangeAdd(&outstanding_work_, 0) > 0)
+@@ -477,11 +477,11 @@ DWORD win_iocp_io_context::get_gqcs_timeout()
+   osvi.dwOSVersionInfoSize = sizeof(osvi);
+   osvi.dwMajorVersion = 6ul;
+ 
+-  const uint64_t condition_mask = ::VerSetConditionMask(
++  /*const uint64_t condition_mask = ::VerSetConditionMask(
+       0, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ 
+   if (!!::VerifyVersionInfo(&osvi, VER_MAJORVERSION, condition_mask))
+-    return INFINITE;
++    return INFINITE;*/
+ 
+   return default_gqcs_timeout;
+ }
+@@ -492,7 +492,7 @@ void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
+ 
+   timer_queues_.insert(&queue);
+ 
+-  if (!waitable_timer_.handle)
++  /*if (!waitable_timer_.handle)
+   {
+     waitable_timer_.handle = ::CreateWaitableTimer(0, FALSE, 0);
+     if (waitable_timer_.handle == 0)
+@@ -508,7 +508,7 @@ void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
+     timeout.QuadPart *= 10;
+     ::SetWaitableTimer(waitable_timer_.handle,
+         &timeout, max_timeout_msec, 0, 0, FALSE);
+-  }
++  }*/
+ 
+   if (!timer_thread_.get())
+   {
+@@ -537,8 +537,8 @@ void win_iocp_io_context::update_timeout()
+       LARGE_INTEGER timeout;
+       timeout.QuadPart = -timeout_usec;
+       timeout.QuadPart *= 10;
+-      ::SetWaitableTimer(waitable_timer_.handle,
+-          &timeout, max_timeout_msec, 0, 0, FALSE);
++      //::SetWaitableTimer(waitable_timer_.handle,
++          //&timeout, max_timeout_msec, 0, 0, FALSE);
+     }
+   }
+ }
+--- a/asio/include/asio/detail/impl/win_thread.ipp
++++ b/asio/include/asio/detail/impl/win_thread.ipp
+@@ -46,7 +46,7 @@ void win_thread::join()
+   ::CloseHandle(exit_event_);
+   if (terminate_threads())
+   {
+-    ::TerminateThread(thread_, 0);
++    //::TerminateThread(thread_, 0);
+   }
+   else
+   {
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/restbed/fetch_and_patch.bat b/contrib/src/restbed/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..61059c5904ee5361bff481244d6254d0dde84369
--- /dev/null
+++ b/contrib/src/restbed/fetch_and_patch.bat
@@ -0,0 +1,22 @@
+set BUILD=%SRC%..\build
+
+set RESTBED_VERSION=34187502642144ab9f749ab40f5cdbd8cb17a54a
+set RESTBED_URL="https://github.com/Corvusoft/restbed.git"
+
+mkdir %BUILD%
+cd %BUILD%
+
+git clone %RESTBED_URL%
+cd restbed
+git checkout %RESTBED_VERSION%
+git apply --reject --whitespace=fix %SRC%\restbed\openssl-repo-uwp.patch
+git submodule update --init --recursive
+git submodule foreach git pull origin master
+cd dependency\asio
+git apply --reject --whitespace=fix %SRC%\restbed\asio-uwp.patch
+
+cd ..\openssl
+git checkout OpenSSL_1_0_2_WinRT-stable
+git apply --reject --whitespace=fix %SRC%\restbed\openssl-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/restbed/openssl-repo-uwp.patch b/contrib/src/restbed/openssl-repo-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..3626602167b7fffe2354649594764f0a6a92aa87
--- /dev/null
+++ b/contrib/src/restbed/openssl-repo-uwp.patch
@@ -0,0 +1,13 @@
+--- a/.gitmodules
++++ b/.gitmodules
+@@ -8,5 +8,5 @@
+ 	branch = master
+ [submodule "dependency/openssl"]
+ 	path = dependency/openssl
+-	url = https://github.com/corvusoft/openssl-dependency
+-	branch = OpenSSL_1_0_2-stable
++	url = https://github.com/Microsoft/openssl
++	branch = OpenSSL_1_0_2_WinRT-stable
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/restbed/openssl-uwp.patch b/contrib/src/restbed/openssl-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..130329461b143cbf8178e17946d401b105a54093
--- /dev/null
+++ b/contrib/src/restbed/openssl-uwp.patch
@@ -0,0 +1,541 @@
+--- a/ms/setVSvars.bat
++++ b/ms/setVSvars.bat
+@@ -178,8 +178,11 @@ exit /b
+ :setEnv
+ 	call:setVar _VS14VC VisualStudio14VC
+ 	call:setVar _WKITS10 WindowsKits10.0
+-	set PATH=%_VS14VCBin%;%PATH%
+-	set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\"
++	call:setVar _WKITS10VER WindowsKits10Version
++	set PATH=%_VS14VC\Bin%;%PATH%
++	set INCLUDE=%_VS14VC%include;%_WKITS10%Include\%_WKITS10VER%\um;%_WKITS10%Include\%_WKITS10VER%\shared;%_WKITS10%Include\%_WKITS10VER%\winrt;%_WKITS10%Include\%_WKITS10VER%\ucrt;
++	set LIB=%_VS14VC%lib\store\%_VCLibPlat%;%_WKITS10%lib\%_WKITS10VER%\um\%_VCPlatform%;%_WKITS10%Lib\%_WKITS10VER%\ucrt\%_VCPlatform%;
++	set LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\
+ 	goto :eof
+ 
+ :end
+--- a/ms/uplink.c
++++ b/ms/uplink.c
+@@ -13,6 +13,12 @@
+ #include <stdio.h>
+ #include "uplink.h"
+ #include <stdlib.h>
++
++FILE * __cdecl __iob_func(void)
++{
++    return __acrt_iob_func;
++}
++
+ void OPENSSL_showfatal(const char *, ...);
+ 
+ static TCHAR msg[128];
+--- /dev/null
++++ b/ms/uptable.asm
+@@ -0,0 +1,504 @@
++OPTION	DOTNAME
++.text$	SEGMENT ALIGN(256) 'CODE'
++EXTERN	OPENSSL_Uplink:NEAR
++PUBLIC	OPENSSL_UplinkTable
++
++ALIGN	16
++_lazy1	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,1
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[8+rax]
++_lazy1_end::
++_lazy1	ENDP
++
++ALIGN	16
++_lazy2	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,2
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[16+rax]
++_lazy2_end::
++_lazy2	ENDP
++
++ALIGN	16
++_lazy3	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,3
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[24+rax]
++_lazy3_end::
++_lazy3	ENDP
++
++ALIGN	16
++_lazy4	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,4
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[32+rax]
++_lazy4_end::
++_lazy4	ENDP
++
++ALIGN	16
++_lazy5	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,5
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[40+rax]
++_lazy5_end::
++_lazy5	ENDP
++
++ALIGN	16
++_lazy6	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,6
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[48+rax]
++_lazy6_end::
++_lazy6	ENDP
++
++ALIGN	16
++_lazy7	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,7
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[56+rax]
++_lazy7_end::
++_lazy7	ENDP
++
++ALIGN	16
++_lazy8	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,8
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[64+rax]
++_lazy8_end::
++_lazy8	ENDP
++
++ALIGN	16
++_lazy9	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,9
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[72+rax]
++_lazy9_end::
++_lazy9	ENDP
++
++ALIGN	16
++_lazy10	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,10
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[80+rax]
++_lazy10_end::
++_lazy10	ENDP
++
++ALIGN	16
++_lazy11	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,11
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[88+rax]
++_lazy11_end::
++_lazy11	ENDP
++
++ALIGN	16
++_lazy12	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,12
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[96+rax]
++_lazy12_end::
++_lazy12	ENDP
++
++ALIGN	16
++_lazy13	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,13
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[104+rax]
++_lazy13_end::
++_lazy13	ENDP
++
++ALIGN	16
++_lazy14	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,14
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[112+rax]
++_lazy14_end::
++_lazy14	ENDP
++
++ALIGN	16
++_lazy15	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,15
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[120+rax]
++_lazy15_end::
++_lazy15	ENDP
++
++ALIGN	16
++_lazy16	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,16
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[128+rax]
++_lazy16_end::
++_lazy16	ENDP
++
++ALIGN	16
++_lazy17	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,17
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[136+rax]
++_lazy17_end::
++_lazy17	ENDP
++
++ALIGN	16
++_lazy18	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,18
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[144+rax]
++_lazy18_end::
++_lazy18	ENDP
++
++ALIGN	16
++_lazy19	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,19
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[152+rax]
++_lazy19_end::
++_lazy19	ENDP
++
++ALIGN	16
++_lazy20	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,20
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[160+rax]
++_lazy20_end::
++_lazy20	ENDP
++
++ALIGN	16
++_lazy21	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,21
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[168+rax]
++_lazy21_end::
++_lazy21	ENDP
++
++ALIGN	16
++_lazy22	PROC PRIVATE
++DB	048h,083h,0ECh,028h
++	mov	QWORD PTR[48+rsp],rcx
++	mov	QWORD PTR[56+rsp],rdx
++	mov	QWORD PTR[64+rsp],r8
++	mov	QWORD PTR[72+rsp],r9
++	lea	rcx,QWORD PTR[OPENSSL_UplinkTable]
++	mov	rdx,22
++	call	OPENSSL_Uplink
++	mov	rcx,QWORD PTR[48+rsp]
++	mov	rdx,QWORD PTR[56+rsp]
++	mov	r8,QWORD PTR[64+rsp]
++	mov	r9,QWORD PTR[72+rsp]
++	lea	rax,QWORD PTR[OPENSSL_UplinkTable]
++	add	rsp,40
++	jmp	QWORD PTR[176+rax]
++_lazy22_end::
++_lazy22	ENDP
++.text$	ENDS
++_DATA	SEGMENT
++OPENSSL_UplinkTable::
++	DQ	22
++	DQ	_lazy1
++	DQ	_lazy2
++	DQ	_lazy3
++	DQ	_lazy4
++	DQ	_lazy5
++	DQ	_lazy6
++	DQ	_lazy7
++	DQ	_lazy8
++	DQ	_lazy9
++	DQ	_lazy10
++	DQ	_lazy11
++	DQ	_lazy12
++	DQ	_lazy13
++	DQ	_lazy14
++	DQ	_lazy15
++	DQ	_lazy16
++	DQ	_lazy17
++	DQ	_lazy18
++	DQ	_lazy19
++	DQ	_lazy20
++	DQ	_lazy21
++	DQ	_lazy22
++_DATA	ENDS
++.pdata	SEGMENT READONLY ALIGN(4)
++ALIGN	4
++	DD	imagerel _lazy1,imagerel _lazy1_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy2,imagerel _lazy2_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy3,imagerel _lazy3_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy4,imagerel _lazy4_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy5,imagerel _lazy5_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy6,imagerel _lazy6_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy7,imagerel _lazy7_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy8,imagerel _lazy8_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy9,imagerel _lazy9_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy10,imagerel _lazy10_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy11,imagerel _lazy11_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy12,imagerel _lazy12_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy13,imagerel _lazy13_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy14,imagerel _lazy14_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy15,imagerel _lazy15_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy16,imagerel _lazy16_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy17,imagerel _lazy17_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy18,imagerel _lazy18_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy19,imagerel _lazy19_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy20,imagerel _lazy20_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy21,imagerel _lazy21_end,imagerel _lazy_unwind_info
++	DD	imagerel _lazy22,imagerel _lazy22_end,imagerel _lazy_unwind_info
++.pdata	ENDS
++.xdata	SEGMENT READONLY ALIGN(8)
++ALIGN	8
++_lazy_unwind_info::
++DB	001h,004h,001h,000h
++DB	004h,042h,000h,000h
++
++.xdata	ENDS
++END
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/samplerate/fetch_and_patch.bat b/contrib/src/samplerate/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..99d76f3969a5b3b1d8824467d081ad3e3cc9dd2e
--- /dev/null
+++ b/contrib/src/samplerate/fetch_and_patch.bat
@@ -0,0 +1,16 @@
+set BUILD=%SRC%..\build
+
+set SAMPLERATE_VERSION=0.1.8
+set SAMPLERATE_URL="http://www.mega-nerd.com/SRC/libsamplerate-%SAMPLERATE_VERSION%.tar.gz"
+
+mkdir %BUILD%
+wget %SAMPLERATE_URL%
+7z -y e libsamplerate-%SAMPLERATE_VERSION%.tar.gz  && 7z -y x libsamplerate-%SAMPLERATE_VERSION%.tar -o%BUILD%
+del libsamplerate-%SAMPLERATE_VERSION%.tar && del libsamplerate-%SAMPLERATE_VERSION%.tar.gz
+rename %BUILD%\libsamplerate-%SAMPLERATE_VERSION% libsamplerate
+
+cd %BUILD%\libsamplerate
+
+git apply --reject --whitespace=fix %SRC%\samplerate\samplerate-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/samplerate/samplerate-uwp.patch b/contrib/src/samplerate/samplerate-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..fb9f6db1d2ec1a481192f3de31c05f7373d4d1a1
--- /dev/null
+++ b/contrib/src/samplerate/samplerate-uwp.patch
@@ -0,0 +1,381 @@
+--- /dev/null
++++ b/MSVC/libsamplerate.sln
+@@ -0,0 +1,28 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25123.0
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsamplerate", "libsamplerate.vcxproj", "{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Debug|x64.ActiveCfg = Debug|x64
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Debug|x64.Build.0 = Debug|x64
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Debug|x86.ActiveCfg = Debug|Win32
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Debug|x86.Build.0 = Debug|Win32
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Release|x64.ActiveCfg = Release|x64
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Release|x64.Build.0 = Release|x64
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Release|x86.ActiveCfg = Release|Win32
++		{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}.Release|x86.Build.0 = Release|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/libsamplerate.vcxproj
+@@ -0,0 +1,190 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{0DC9504B-4FF5-4590-97B3-FFD4C04F2893}</ProjectGuid>
++    <RootNamespace>libsamplerate</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>true</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseDebugLibraries>false</UseDebugLibraries>
++    <PlatformToolset>v140</PlatformToolset>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++    <CharacterSet>MultiByte</CharacterSet>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="Shared">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <TargetExt>.lib</TargetExt>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <TargetExt>.lib</TargetExt>
++    <TargetName>$(ProjectName)d</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <TargetExt>.lib</TargetExt>
++    <OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>Disabled</Optimization>
++      <SDLCheck>true</SDLCheck>
++      <DisableSpecificWarnings>4244;4305;</DisableSpecificWarnings>
++    </ClCompile>
++    <PreBuildEvent>
++      <Command>
++      </Command>
++    </PreBuildEvent>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++copy $(OutDir)$(TargetName)$(TargetExt) $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\src\*.h $(SolutionDir)..\..\include
++</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>Disabled</Optimization>
++      <SDLCheck>true</SDLCheck>
++      <DisableSpecificWarnings>4244;4305;</DisableSpecificWarnings>
++    </ClCompile>
++    <PreBuildEvent>
++      <Command>
++      </Command>
++    </PreBuildEvent>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x64
++copy $(OutDir)$(TargetName)$(TargetExt) $(SolutionDir)..\..\lib\x64
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\src\*.h $(SolutionDir)..\..\include
++</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>MaxSpeed</Optimization>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <SDLCheck>true</SDLCheck>
++      <DisableSpecificWarnings>4244;4305;</DisableSpecificWarnings>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++    </ClCompile>
++    <Link>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <OptimizeReferences>true</OptimizeReferences>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++copy $(OutDir)$(TargetName)$(TargetExt) $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\src\*.h $(SolutionDir)..\..\include
++</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <WarningLevel>Level3</WarningLevel>
++      <Optimization>MaxSpeed</Optimization>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <SDLCheck>true</SDLCheck>
++      <DisableSpecificWarnings>4244;4305;</DisableSpecificWarnings>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++    </ClCompile>
++    <Link>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <OptimizeReferences>true</OptimizeReferences>
++    </Link>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\lib
++mkdir $(ProjectDir)..\..\lib\x64
++copy $(OutDir)$(TargetName)$(TargetExt) $(ProjectDir)..\..\lib\x64
++mkdir $(ProjectDir)..\..\include
++xcopy /S /Y $(ProjectDir)..\src\*.h $(ProjectDir)..\..\include
++</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClCompile Include="..\src\samplerate.c" />
++    <ClCompile Include="..\src\src_linear.c" />
++    <ClCompile Include="..\src\src_sinc.c" />
++    <ClCompile Include="..\src\src_zoh.c" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\src\common.h" />
++    <ClInclude Include="..\src\config.h" />
++    <ClInclude Include="..\src\fastest_coeffs.h" />
++    <ClInclude Include="..\src\float_cast.h" />
++    <ClInclude Include="..\src\high_qual_coeffs.h" />
++    <ClInclude Include="..\src\mid_qual_coeffs.h" />
++    <ClInclude Include="..\src\samplerate.h" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/src/config.h
+@@ -0,0 +1,150 @@
++/* src/config.h.  Generated from config.h.in by configure.  */
++/* src/config.h.in.  Generated from configure.ac by autoheader.  */
++
++/* Set to 1 if the compile is GNU GCC. */
++#define COMPILER_IS_GCC 1
++
++/* Target processor clips on negative float to int conversion. */
++#define CPU_CLIPS_NEGATIVE 1
++
++/* Target processor clips on positive float to int conversion. */
++#define CPU_CLIPS_POSITIVE 0
++
++/* Target processor is big endian. */
++#define CPU_IS_BIG_ENDIAN 0
++
++/* Target processor is little endian. */
++#define CPU_IS_LITTLE_ENDIAN 1
++
++/* Major version of GCC or 3 otherwise. */
++#define GCC_MAJOR_VERSION 5
++
++/* Define to 1 if you have the `alarm' function. */
++#define HAVE_ALARM 1
++
++/* Define to 1 if you have the `calloc' function. */
++#define HAVE_CALLOC 1
++
++/* Define to 1 if you have the `ceil' function. */
++#define HAVE_CEIL 1
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++
++/* Set to 1 if you have libfftw3. */
++#define HAVE_FFTW3 0
++
++/* Define to 1 if you have the `floor' function. */
++#define HAVE_FLOOR 1
++
++/* Define to 1 if you have the `fmod' function. */
++#define HAVE_FMOD 1
++
++/* Define to 1 if you have the `free' function. */
++#define HAVE_FREE 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `m' library (-lm). */
++#define HAVE_LIBM 1
++
++/* Define if you have C99's lrint function. */
++#define HAVE_LRINT 1
++
++/* Define if you have C99's lrintf function. */
++#define HAVE_LRINTF 1
++
++/* Define to 1 if you have the `malloc' function. */
++#define HAVE_MALLOC 1
++
++/* Define to 1 if you have the `memcpy' function. */
++#define HAVE_MEMCPY 1
++
++/* Define to 1 if you have the `memmove' function. */
++#define HAVE_MEMMOVE 1
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define HAVE_MEMORY_H 1
++
++/* Define if you have signal SIGALRM. */
++#define HAVE_SIGALRM 1
++
++/* Define to 1 if you have the `signal' function. */
++#define HAVE_SIGNAL 1
++
++/* Set to 1 if you have libsndfile. */
++#define HAVE_SNDFILE 0
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/times.h> header file. */
++#define HAVE_SYS_TIMES_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++   */
++#define LT_OBJDIR ".libs/"
++
++/* Define to 1 if your C compiler doesn't accept -c and -o together. */
++/* #undef NO_MINUS_C_MINUS_O */
++
++/* Set to 1 if compiling for Win32 */
++#define OS_IS_WIN32 0
++
++/* Name of package */
++#define PACKAGE "libsamplerate"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT "erikd@mega-nerd.com"
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME "libsamplerate"
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING "libsamplerate 0.1.8"
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME "libsamplerate"
++
++/* Define to the home page for this package. */
++#define PACKAGE_URL "http://www.mega-nerd.com/libsamplerate/"
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION "0.1.8"
++
++/* The size of `double', as computed by sizeof. */
++#define SIZEOF_DOUBLE 8
++
++/* The size of `float', as computed by sizeof. */
++#define SIZEOF_FLOAT 4
++
++/* The size of `int', as computed by sizeof. */
++#define SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define SIZEOF_LONG 4
++
++/* Define to 1 if you have the ANSI C header files. */
++#define STDC_HEADERS 1
++
++/* Version number of package */
++#define VERSION "0.1.8"
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/upnp/fetch_and_patch.bat b/contrib/src/upnp/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..9e33b15b4913224f795eebec1e37eb7ad5466230
--- /dev/null
+++ b/contrib/src/upnp/fetch_and_patch.bat
@@ -0,0 +1,16 @@
+set BUILD=%SRC%..\build
+
+set UPNP_VERSION=1.6.19
+set UPNP_URL=https://github.com/mrjimenez/pupnp/archive/release-%UPNP_VERSION%.tar.gz
+
+mkdir %BUILD%
+wget %UPNP_URL%
+7z -y x release-%UPNP_VERSION%.tar.gz && 7z -y x release-%UPNP_VERSION%.tar -o%BUILD%
+del release-%UPNP_VERSION%.tar && del release-%UPNP_VERSION%.tar.gz && del %BUILD%\pax_global_header
+rename %BUILD%\pupnp-release-%UPNP_VERSION% libupnp
+
+cd %BUILD%\libupnp
+
+git apply --reject --whitespace=fix %SRC%\upnp\libupnp-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/upnp/libupnp-uwp.patch b/contrib/src/upnp/libupnp-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..85b3da64c8f4f8e742e81f5c1c8980eccb40ddee
--- /dev/null
+++ b/contrib/src/upnp/libupnp-uwp.patch
@@ -0,0 +1,3316 @@
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,112 +1,366 @@
+-#
+-# NOTE! Don't add files that are generated in specific
+-# subdirectories here. Add them in the ".gitignore" file
+-# in that subdirectory instead.
+-#
+-# NOTE! Please use 'git ls-files -i --exclude-standard'
+-# command after changing this file, to see if there are
+-# any tracked files which get ignored after the change.
+-#
+-# Normal rules
+-#
+-.*
+-*.o
+-*.o.*
+-*.a
+-*.s
+-*.ko
+-*.so
+-*.so.dbg
+-*.mod.c
+-*.i
+-*.lst
+-*.symtypes
+-*.order
+-modules.builtin
+-*.elf
+-*.bin
+-*.gz
+-*.bz2
+-*.lzma
+-*.patch
+-*.gcno
+-
+-#
+-# Top-level generic files
+-#
+-/tags
+-/TAGS
+-/linux
+-/vmlinux
+-/vmlinuz
+-/System.map
+-/Module.markers
+-/Module.symvers
+-
+-#
+-# git files that we don't want to ignore even it they are dot-files
+-#
+-!.gitignore
+-!.mailmap
+-
+-#
+-# Generated include files
+-#
+-include/config
+-include/linux/version.h
+-include/generated
+-
+-# stgit generated dirs
+-patches-*
+-
+-# quilt's files
+-patches
+-series
+-
+-# cscope files
+-cscope.*
+-ncscope.*
+-
+-# gnu global files
+-GPATH
+-GRTAGS
+-GSYMS
+-GTAGS
+-
+-*.orig
+-*~
+-\#*#
+-*.lo
+-*.la
+-Makefile
+-Makefile.in
+-aclocal.m4
+-autoconfig.h
+-autoconfig.h.in
+-autom4te.cache/
+-build-aux/
+-config.log
+-config.status
+-configure
+-libtool
+-libupnp.pc
+-m4/libtool.m4
+-m4/ltoptions.m4
+-m4/ltsugar.m4
+-m4/ltversion.m4
+-m4/lt~obsolete.m4
+-stamp-h1
+-upnp/inc/stamp-h2
+-upnp/inc/upnpconfig.h
+-upnp/sample/tv_combo
+-upnp/sample/tv_ctrlpt
+-upnp/sample/tv_device
+-upnp/unittest/unittest
+-upnp/unittest/*.pp.c
+-docs/doxygen
+-
+-
+-/build/vc10/out.vc9.Win32/Debug
+-/build/vc10/out.vc10.Win32
+-/build/vc10/out.vc10.x64
+-/pthreads
+\ No newline at end of file
++#
++# NOTE! Don't add files that are generated in specific
++# subdirectories here. Add them in the ".gitignore" file
++# in that subdirectory instead.
++#
++# NOTE! Please use 'git ls-files -i --exclude-standard'
++# command after changing this file, to see if there are
++# any tracked files which get ignored after the change.
++#
++# Normal rules
++#
++.*
++*.o
++*.o.*
++*.a
++*.s
++*.ko
++*.so
++*.so.dbg
++*.mod.c
++*.i
++*.lst
++*.symtypes
++*.order
++modules.builtin
++*.elf
++*.bin
++*.gz
++*.bz2
++*.lzma
++*.patch
++*.gcno
++
++#
++# Top-level generic files
++#
++/tags
++/TAGS
++/linux
++/vmlinux
++/vmlinuz
++/System.map
++/Module.markers
++/Module.symvers
++
++#
++# git files that we don't want to ignore even it they are dot-files
++#
++!.gitignore
++!.mailmap
++
++#
++# Generated include files
++#
++include/config
++include/linux/version.h
++include/generated
++
++# stgit generated dirs
++patches-*
++
++# quilt's files
++patches
++series
++
++# cscope files
++cscope.*
++ncscope.*
++
++# gnu global files
++GPATH
++GRTAGS
++GSYMS
++GTAGS
++
++*.orig
++*~
++\#*#
++*.lo
++*.la
++Makefile
++Makefile.in
++aclocal.m4
++autoconfig.h
++autoconfig.h.in
++autom4te.cache/
++build-aux/
++config.log
++config.status
++configure
++libtool
++libupnp.pc
++m4/libtool.m4
++m4/ltoptions.m4
++m4/ltsugar.m4
++m4/ltversion.m4
++m4/lt~obsolete.m4
++stamp-h1
++upnp/inc/stamp-h2
++upnp/inc/upnpconfig.h
++upnp/sample/tv_combo
++upnp/sample/tv_ctrlpt
++upnp/sample/tv_device
++upnp/unittest/unittest
++upnp/unittest/*.pp.c
++docs/doxygen
++
++
++/build/vc10/out.vc9.Win32/Debug
++/build/vc10/out.vc10.Win32
++/build/vc10/out.vc10.x64
++/pthreads
++
++## Ignore Visual Studio temporary files, build results, and
++## files generated by popular Visual Studio add-ons.
++
++#output directories
++DebugDLL/
++Debug/
++ReleaseDLL/
++Release/
++.config/
++# User-specific files
++*.suo
++*.user
++*.userosscache
++*.sln.docstates
++*.VC.VC.opendb
++*.VC.db
++*.db
++IUpnpErrFile.txt
++IUpnpInfoFile.txt
++*.rej
++
++# User-specific files (MonoDevelop/Xamarin Studio)
++*.userprefs
++
++# Build results
++[Dd]ebug/
++[Dd]ebugPublic/
++[Rr]elease/
++[Rr]eleases/
++x64/
++x86/
++bld/
++[Bb]in/
++[Oo]bj/
++
++# Visual Studio 2015 cache/options directory
++.vs/
++# Uncomment if you have tasks that create the project's static files in wwwroot
++#wwwroot/
++
++# MSTest test Results
++[Tt]est[Rr]esult*/
++[Bb]uild[Ll]og.*
++
++# NUNIT
++*.VisualState.xml
++TestResult.xml
++
++# Build Results of an ATL Project
++[Dd]ebugPS/
++[Rr]eleasePS/
++dlldata.c
++
++# DNX
++project.lock.json
++artifacts/
++
++*_i.c
++*_p.c
++*_i.h
++*.ilk
++*.meta
++*.obj
++*.pch
++*.pdb
++*.pgc
++*.pgd
++*.rsp
++*.sbr
++*.tlb
++*.tli
++*.tlh
++*.tmp
++*.tmp_proj
++*.log
++*.vspscc
++*.vssscc
++.builds
++*.pidb
++*.svclog
++*.scc
++*.exe
++*.dll
++*.lib
++
++# Chutzpah Test files
++_Chutzpah*
++
++# Visual C++ cache files
++ipch/
++*.aps
++*.ncb
++*.opendb
++*.opensdf
++*.sdf
++*.cachefile
++
++# Visual Studio profiler
++*.psess
++*.vsp
++*.vspx
++*.sap
++
++# TFS 2012 Local Workspace
++$tf/
++
++# Guidance Automation Toolkit
++*.gpState
++
++# ReSharper is a .NET coding add-in
++_ReSharper*/
++*.[Rr]e[Ss]harper
++*.DotSettings.user
++
++# JustCode is a .NET coding add-in
++.JustCode
++
++# TeamCity is a build add-in
++_TeamCity*
++
++# DotCover is a Code Coverage Tool
++*.dotCover
++
++# NCrunch
++_NCrunch_*
++.*crunch*.local.xml
++nCrunchTemp_*
++
++# MightyMoose
++*.mm.*
++AutoTest.Net/
++
++# Web workbench (sass)
++.sass-cache/
++
++# Installshield output folder
++[Ee]xpress/
++
++# DocProject is a documentation generator add-in
++DocProject/buildhelp/
++DocProject/Help/*.HxT
++DocProject/Help/*.HxC
++DocProject/Help/*.hhc
++DocProject/Help/*.hhk
++DocProject/Help/*.hhp
++DocProject/Help/Html2
++DocProject/Help/html
++
++# Click-Once directory
++publish/
++
++# Publish Web Output
++*.[Pp]ublish.xml
++*.azurePubxml
++# TODO: Comment the next line if you want to checkin your web deploy settings 
++# but database connection strings (with potential passwords) will be unencrypted
++*.pubxml
++*.publishproj
++
++# NuGet Packages
++*.nupkg
++# The packages folder can be ignored because of Package Restore
++**/packages/*
++# except build/, which is used as an MSBuild target.
++!**/packages/build/
++# Uncomment if necessary however generally it will be regenerated when needed
++#!**/packages/repositories.config
++# NuGet v3's project.json files produces more ignoreable files
++*.nuget.props
++*.nuget.targets
++
++# Microsoft Azure Build Output
++csx/
++*.build.csdef
++
++# Microsoft Azure Emulator
++ecf/
++rcf/
++
++# Microsoft Azure ApplicationInsights config file
++ApplicationInsights.config
++
++# Windows Store app package directory
++AppPackages/
++BundleArtifacts/
++
++# Visual Studio cache files
++# files ending in .cache can be ignored
++*.[Cc]ache
++# but keep track of directories ending in .cache
++!*.[Cc]ache/
++
++# Others
++ClientBin/
++~$*
++*~
++*.dbmdl
++*.dbproj.schemaview
++*.pfx
++*.publishsettings
++node_modules/
++orleans.codegen.cs
++
++# RIA/Silverlight projects
++Generated_Code/
++
++# Backup & report files from converting an old project file
++# to a newer Visual Studio version. Backup files are not needed,
++# because we have git ;-)
++_UpgradeReport_Files/
++Backup*/
++UpgradeLog*.XML
++UpgradeLog*.htm
++
++# SQL Server files
++*.mdf
++*.ldf
++
++# Business Intelligence projects
++*.rdl.data
++*.bim.layout
++*.bim_*.settings
++
++# Microsoft Fakes
++FakesAssemblies/
++
++# GhostDoc plugin setting file
++*.GhostDoc.xml
++
++# Node.js Tools for Visual Studio
++.ntvs_analysis.dat
++
++# Visual Studio 6 build log
++*.plg
++
++# Visual Studio 6 workspace options file
++*.opt
++
++# Visual Studio LightSwitch build output
++**/*.HTMLClient/GeneratedArtifacts
++**/*.DesktopClient/GeneratedArtifacts
++**/*.DesktopClient/ModelManifest.xml
++**/*.Server/GeneratedArtifacts
++**/*.Server/ModelManifest.xml
++_Pvt_Extensions
++
++# Paket dependency manager
++.paket/paket.exe
++
++# FAKE - F# Make
++.fake/
++
++!config.h
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/libupnp.sln
+@@ -0,0 +1,139 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25123.0
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "..\build\VS2015\libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "..\build\VS2015\ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
++EndProject
++Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dependencies", "dependencies", "{9A01C9FF-6331-4510-B971-2BCD1CA970FD}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "..\build\VS2015\threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "..\build\VS2015\tvcombo.vcxproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "..\build\VS2015\tvctrlpt.vcxproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "..\build\VS2015\tvdevice.vcxproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		DebugDLL|x64 = DebugDLL|x64
++		DebugDLL|x86 = DebugDLL|x86
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++		ReleaseDLL|x64 = ReleaseDLL|x64
++		ReleaseDLL|x86 = ReleaseDLL|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.ActiveCfg = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.Build.0 = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.ActiveCfg = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.Build.0 = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.ActiveCfg = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.Build.0 = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.ActiveCfg = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.Build.0 = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.ActiveCfg = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.Build.0 = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.ActiveCfg = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.Build.0 = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x86.ActiveCfg = Debug|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x86.Build.0 = Debug|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x86.ActiveCfg = Release|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x86.Build.0 = Release|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x86.ActiveCfg = Debug|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x86.Build.0 = Debug|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x86.ActiveCfg = Release|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x86.Build.0 = Release|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x86.ActiveCfg = Debug|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x86.Build.0 = Debug|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x86.ActiveCfg = Release|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x86.Build.0 = Release|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++	GlobalSection(NestedProjects) = preSolution
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++	EndGlobalSection
++EndGlobal
+--- a/MSVC/libupnp.sln
++++ b/MSVC/libupnp.sln
+@@ -1,139 +1,82 @@
+-
+-Microsoft Visual Studio Solution File, Format Version 12.00
+-# Visual Studio 14
+-VisualStudioVersion = 14.0.25123.0
+-MinimumVisualStudioVersion = 10.0.40219.1
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "..\build\VS2015\libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
+-EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "..\build\VS2015\ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
+-EndProject
+-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dependencies", "dependencies", "{9A01C9FF-6331-4510-B971-2BCD1CA970FD}"
+-EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "..\build\VS2015\threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
+-EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "..\build\VS2015\tvcombo.vcxproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
+-EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "..\build\VS2015\tvctrlpt.vcxproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
+-EndProject
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "..\build\VS2015\tvdevice.vcxproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
+-EndProject
+-Global
+-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+-		Debug|x64 = Debug|x64
+-		Debug|x86 = Debug|x86
+-		DebugDLL|x64 = DebugDLL|x64
+-		DebugDLL|x86 = DebugDLL|x86
+-		Release|x64 = Release|x64
+-		Release|x86 = Release|x86
+-		ReleaseDLL|x64 = ReleaseDLL|x64
+-		ReleaseDLL|x86 = ReleaseDLL|x86
+-	EndGlobalSection
+-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.ActiveCfg = Debug|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.Build.0 = Debug|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.ActiveCfg = Release|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.Build.0 = Release|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.ActiveCfg = Debug|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.Build.0 = Debug|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.ActiveCfg = Release|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.Build.0 = Release|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.ActiveCfg = Debug|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.Build.0 = Debug|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.ActiveCfg = Release|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.Build.0 = Release|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x86.ActiveCfg = Debug|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x86.Build.0 = Debug|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x86.ActiveCfg = Release|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x86.Build.0 = Release|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x86.ActiveCfg = Debug|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x86.Build.0 = Debug|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x86.ActiveCfg = Release|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x86.Build.0 = Release|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x86.ActiveCfg = Debug|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x86.Build.0 = Debug|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.DebugDLL|x86.Build.0 = DebugDLL|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x86.ActiveCfg = Release|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x86.Build.0 = Release|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
+-	EndGlobalSection
+-	GlobalSection(SolutionProperties) = preSolution
+-		HideSolutionNode = FALSE
+-	EndGlobalSection
+-	GlobalSection(NestedProjects) = preSolution
+-		{9C2C266D-35A3-465F-A297-0E21D54E5C89} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
+-		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
+-		{6365804B-22C6-4D5E-91F3-0C052EB55B4F} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
+-		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
+-		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
+-	EndGlobalSection
+-EndGlobal
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25420.1
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "..\build\VS2015\libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "..\build\VS2015\ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
++EndProject
++Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dependencies", "dependencies", "{9A01C9FF-6331-4510-B971-2BCD1CA970FD}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "..\build\VS2015\threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|x64 = Debug|x64
++		Debug|x86 = Debug|x86
++		DebugDLL|x64 = DebugDLL|x64
++		DebugDLL|x86 = DebugDLL|x86
++		Release|x64 = Release|x64
++		Release|x86 = Release|x86
++		ReleaseDLL|x64 = ReleaseDLL|x64
++		ReleaseDLL|x86 = ReleaseDLL|x86
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.ActiveCfg = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x86.Build.0 = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.ActiveCfg = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x86.Build.0 = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.ActiveCfg = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x86.Build.0 = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.ActiveCfg = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x86.Build.0 = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.ActiveCfg = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x86.Build.0 = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x64.Build.0 = DebugDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.ActiveCfg = DebugDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.DebugDLL|x86.Build.0 = DebugDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.ActiveCfg = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x86.Build.0 = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.ActiveCfg = ReleaseDLL|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.ReleaseDLL|x86.Build.0 = ReleaseDLL|Win32
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++	GlobalSection(NestedProjects) = preSolution
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D} = {9A01C9FF-6331-4510-B971-2BCD1CA970FD}
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/build/VS2015/ixml.vcxproj
+@@ -0,0 +1,361 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|Win32">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|x64">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|Win32">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|x64">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{9C2C266D-35A3-465F-A297-0E21D54E5C89}</ProjectGuid>
++    <RootNamespace>ixml</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup>
++    <_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++    <TargetName>$(ProjectName)</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++    <TargetName>$(ProjectName)</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\MSVC\$(Platform)\</OutDir>
++    <IntDir>$(ProjectDir)..\..\MSVC\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>$(OutDir);$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\ixml\src\attr.c" />
++    <ClCompile Include="..\..\ixml\src\document.c" />
++    <ClCompile Include="..\..\ixml\src\element.c" />
++    <ClCompile Include="..\..\ixml\src\ixml.c" />
++    <ClCompile Include="..\..\ixml\src\ixmldebug.c" />
++    <ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
++    <ClCompile Include="..\..\ixml\src\ixmlparser.c" />
++    <ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
++    <ClCompile Include="..\..\ixml\src\node.c" />
++    <ClCompile Include="..\..\ixml\src\nodeList.c" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\ixml\inc\ixml.h" />
++    <ClInclude Include="..\..\ixml\inc\ixmldebug.h" />
++    <ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h" />
++    <ClInclude Include="..\..\ixml\src\inc\ixmlparser.h" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/build/VS2015/ixml.vcxproj.filters
+@@ -0,0 +1,59 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup>
++    <Filter Include="Source Files">
++      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
++      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
++    </Filter>
++    <Filter Include="Header Files">
++      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
++      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
++    </Filter>
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\ixml\src\attr.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\document.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\element.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixml.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixmldebug.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixmlparser.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\namedNodeMap.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\node.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\nodeList.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\ixml\inc\ixml.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\ixml\inc\ixmldebug.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\ixml\src\inc\ixmlparser.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++  </ItemGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/build/VS2015/libupnp.sln
+@@ -0,0 +1,130 @@
++
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.24720.0
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcxproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcxproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
++EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcxproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug Lib|Win32 = Debug Lib|Win32
++		Debug Lib|x64 = Debug Lib|x64
++		Debug|Win32 = Debug|Win32
++		Debug|x64 = Debug|x64
++		Release Lib|Win32 = Release Lib|Win32
++		Release Lib|x64 = Release Lib|x64
++		Release|Win32 = Release|Win32
++		Release|x64 = Release|x64
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.ActiveCfg = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.Build.0 = Release Lib|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
++		{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.ActiveCfg = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.Build.0 = Debug|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.Build.0 = Release Lib|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.ActiveCfg = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.Build.0 = Release|Win32
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
++		{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.ActiveCfg = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.Build.0 = Debug|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.Build.0 = Release Lib|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.ActiveCfg = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.Build.0 = Release|Win32
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
++		{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.ActiveCfg = Debug|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.Build.0 = Debug|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.Build.0 = Release Lib|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.ActiveCfg = Release|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.Build.0 = Release|Win32
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
++		{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.ActiveCfg = Debug|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.Build.0 = Debug|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.Build.0 = Release Lib|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.ActiveCfg = Release|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.Build.0 = Release|Win32
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
++		{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.Build.0 = Debug Lib|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.ActiveCfg = Debug|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.Build.0 = Debug|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.Build.0 = Release Lib|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.ActiveCfg = Release Lib|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.Build.0 = Release Lib|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.ActiveCfg = Release|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.Build.0 = Release|Win32
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
++		{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/build/VS2015/libupnp.vcxproj
+@@ -0,0 +1,768 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|Win32">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|x64">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|Win32">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|x64">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{6227F51A-1498-4C4A-B213-F6FDED605125}</ProjectGuid>
++    <RootNamespace>libupnp</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>false</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>false</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>false</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
++    <ConfigurationType>DynamicLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>false</WholeProgramOptimization>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup>
++    <_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetName>libupnp</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetName>libupnp</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetExt>.dll</TargetExt>
++    <TargetName>libupnpd</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <LinkIncremental>false</LinkIncremental>
++    <TargetName>libupnpd</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <TargetName>libupnpd</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <TargetName>libupnpd</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++    <TargetName>libupnp</TargetName>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\MSVC\$(Platform)\</OutDir>
++    <IntDir>$(ProjectDir)..\..\MSVC\$(Platform)\tmp\$(ProjectName)\</IntDir>
++    <TargetName>libupnp</TargetName>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir)%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
++      <SubSystem>Windows</SubSystem>
++      <OptimizeReferences>true</OptimizeReferences>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
++      <RandomizedBaseAddress>false</RandomizedBaseAddress>
++      <DataExecutionPrevention />
++      <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>.\Release/libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++xcopy /S /Y $(OutDir)libupnp.lib $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\bin
++mkdir $(SolutionDir)..\..\bin\x86
++xcopy /S /Y $(OutDir)libupnp.dll $(SolutionDir)..\..\bin\x86
++xcopy /S /Y $(OutDir)libupnp.dll $(SolutionDir)..\upnp\sample</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir)%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
++      <SubSystem>Windows</SubSystem>
++      <OptimizeReferences>true</OptimizeReferences>
++      <EnableCOMDATFolding>true</EnableCOMDATFolding>
++      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
++      <RandomizedBaseAddress>false</RandomizedBaseAddress>
++      <DataExecutionPrevention />
++      <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>.\Release/libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x64
++xcopy /S /Y $(OutDir)libupnp.lib $(SolutionDir)..\..\lib\x64
++mkdir $(SolutionDir)..\..\bin
++mkdir $(SolutionDir)..\..\bin\x64
++xcopy /S /Y $(OutDir)libupnp.dll $(SolutionDir)..\..\bin\x64
++xcopy /S /Y $(OutDir)libupnp.dll $(SolutionDir)..\upnp\sample</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
++      <SuppressStartupBanner>false</SuppressStartupBanner>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
++      <SubSystem>Windows</SubSystem>
++      <RandomizedBaseAddress>false</RandomizedBaseAddress>
++      <DataExecutionPrevention />
++      <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX86</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(OutDir)libupnp.bsc</OutputFile>
++    </Bscmake>
++    <ProjectReference>
++      <LinkLibraryDependencies>true</LinkLibraryDependencies>
++    </ProjectReference>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++xcopy /S /Y $(OutDir)libupnpd.lib $(SolutionDir)..\..\lib\x86
++mkdir $(SolutionDir)..\..\bin
++mkdir $(SolutionDir)..\..\bin\x86
++xcopy /S /Y $(OutDir)libupnpd.dll $(SolutionDir)..\..\bin\x86
++xcopy /S /Y $(OutDir)libupnpd.dll $(SolutionDir)..\upnp\sample</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Link>
++      <AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
++      <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
++      <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
++      <SubSystem>Windows</SubSystem>
++      <RandomizedBaseAddress>false</RandomizedBaseAddress>
++      <DataExecutionPrevention />
++      <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
++      <TargetMachine>MachineX64</TargetMachine>
++    </Link>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(OutDir)libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x64
++xcopy /S /Y $(OutDir)libupnpd.lib $(SolutionDir)..\..\lib\x64
++mkdir $(SolutionDir)..\..\bin
++mkdir $(SolutionDir)..\..\bin\x64
++xcopy /S /Y $(OutDir)libupnpd.dll $(SolutionDir)..\..\bin\64
++xcopy /S /Y $(OutDir)libupnpd.dll $(SolutionDir)..\upnp\sample</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <SuppressStartupBanner>false</SuppressStartupBanner>
++    </Lib>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(OutDir)libupnp.bsc</OutputFile>
++    </Bscmake>
++    <ProjectReference>
++      <LinkLibraryDependencies>true</LinkLibraryDependencies>
++    </ProjectReference>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++xcopy /S /Y $(OutDir)libupnpd.lib $(SolutionDir)..\..\lib\x86</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Midl>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>$(OutDir)libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x64
++xcopy /S /Y $(OutDir)libupnpd.lib $(SolutionDir)..\..\lib\x64</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>Win32</TargetEnvironment>
++      <TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;$(ProjectDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(ProjectDir)..\..\..\bin\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>.\Release/libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++mkdir $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\upnp\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\build\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\src\inc\*.h $(SolutionDir)..\..\include\upnp
++xcopy /S /Y $(SolutionDir)..\ixml\inc\*.h $(SolutionDir)..\..\include\upnp
++mkdir $(SolutionDir)..\..\lib
++mkdir $(SolutionDir)..\..\lib\x86
++xcopy /S /Y $(OutDir)libupnp.lib $(SolutionDir)..\..\lib\x86</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Midl>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MkTypLibCompatible>true</MkTypLibCompatible>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <TargetEnvironment>X64</TargetEnvironment>
++      <TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
++      <HeaderFileName />
++    </Midl>
++    <ClCompile>
++      <Optimization>MinSpace</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <WholeProgramOptimization>false</WholeProgramOptimization>
++      <AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;$(ProjectDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <PrecompiledHeaderOutputFile />
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <BrowseInformation />
++      <WarningLevel>Level3</WarningLevel>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <Culture>0x0407</Culture>
++    </ResourceCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(ProjectDir)..\..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <AdditionalDependencies>pthreads-UWP.lib</AdditionalDependencies>
++      <AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++    <Bscmake>
++      <SuppressStartupBanner>true</SuppressStartupBanner>
++      <OutputFile>.\Release/libupnp.bsc</OutputFile>
++    </Bscmake>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\..\include
++mkdir $(ProjectDir)..\..\..\include\upnp
++xcopy /S /Y $(ProjectDir)..\..\upnp\inc\*.h $(ProjectDir)..\..\..\include\upnp
++xcopy /S /Y $(ProjectDir)..\..\build\inc\*.h $(ProjectDir)..\..\..\include\upnp
++xcopy /S /Y $(ProjectDir)..\..\ixml\src\inc\*.h $(ProjectDir)..\..\..\include\upnp
++xcopy /S /Y $(ProjectDir)..\..\ixml\inc\*.h $(ProjectDir)..\..\..\include\upnp
++mkdir $(ProjectDir)..\..\..\lib
++mkdir $(ProjectDir)..\..\..\lib\x64
++xcopy /S /Y $(OutDir)libupnp.lib $(ProjectDir)..\..\..\lib\x64</Command>
++    </PostBuildEvent>
++    <ProjectReference>
++      <LinkLibraryDependencies>true</LinkLibraryDependencies>
++    </ProjectReference>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\ixml\src\attr.c" />
++    <ClCompile Include="..\..\ixml\src\document.c" />
++    <ClCompile Include="..\..\ixml\src\element.c" />
++    <ClCompile Include="..\..\ixml\src\ixml.c" />
++    <ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
++    <ClCompile Include="..\..\ixml\src\ixmlparser.c" />
++    <ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
++    <ClCompile Include="..\..\ixml\src\node.c" />
++    <ClCompile Include="..\..\ixml\src\nodeList.c" />
++    <ClCompile Include="..\..\threadutil\src\FreeList.c" />
++    <ClCompile Include="..\..\threadutil\src\LinkedList.c" />
++    <ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
++    <ClCompile Include="..\..\threadutil\src\TimerThread.c" />
++    <ClCompile Include="..\..\upnp\src\api\upnpapi.c" />
++    <ClCompile Include="..\..\upnp\src\api\upnpdebug.c" />
++    <ClCompile Include="..\..\upnp\src\api\UpnpString.c" />
++    <ClCompile Include="..\..\upnp\src\api\upnptools.c" />
++    <ClCompile Include="..\..\upnp\src\gena\gena_callback2.c" />
++    <ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c" />
++    <ClCompile Include="..\..\upnp\src\gena\gena_device.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\sock.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c" />
++    <ClCompile Include="..\..\upnp\src\genlib\util\util.c" />
++    <ClCompile Include="..\..\upnp\src\soap\soap_common.c" />
++    <ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c" />
++    <ClCompile Include="..\..\upnp\src\soap\soap_device.c" />
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c" />
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c" />
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c" />
++    <ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c" />
++    <ClCompile Include="..\..\upnp\src\uuid\md5.c" />
++    <ClCompile Include="..\..\upnp\src\uuid\sysdep.c" />
++    <ClCompile Include="..\..\upnp\src\uuid\uuid.c" />
++    <ClCompile Include="..\..\upnp\src\win_dll.c" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\upnp\inc\Callback.h" />
++    <ClInclude Include="..\..\upnp\inc\TemplateInclude.h" />
++    <ClInclude Include="..\..\upnp\inc\TemplateSource.h" />
++    <ClInclude Include="..\..\upnp\inc\TemplateUndef.h" />
++    <ClInclude Include="..\..\upnp\inc\upnp.h" />
++    <ClInclude Include="..\..\upnp\inc\upnpdebug.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpGlobal.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpInet.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpStdInt.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpString.h" />
++    <ClInclude Include="..\..\upnp\inc\upnptools.h" />
++    <ClInclude Include="..\..\upnp\inc\UpnpUniStd.h" />
++    <ClInclude Include="..\..\upnp\src\inc\client_table.h" />
++    <ClInclude Include="..\..\upnp\src\inc\config.h" />
++    <ClInclude Include="..\..\upnp\src\inc\gena.h" />
++    <ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h" />
++    <ClInclude Include="..\..\upnp\src\inc\gena_device.h" />
++    <ClInclude Include="..\..\upnp\src\inc\global.h" />
++    <ClInclude Include="..\..\upnp\src\inc\gmtdate.h" />
++    <ClInclude Include="..\..\upnp\src\inc\httpparser.h" />
++    <ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h" />
++    <ClInclude Include="..\..\upnp\src\inc\md5.h" />
++    <ClInclude Include="..\..\upnp\src\inc\membuffer.h" />
++    <ClInclude Include="..\..\upnp\src\inc\miniserver.h" />
++    <ClInclude Include="..\..\upnp\src\inc\netall.h" />
++    <ClInclude Include="..\..\upnp\src\inc\parsetools.h" />
++    <ClInclude Include="..\..\upnp\src\inc\server.h" />
++    <ClInclude Include="..\..\upnp\src\inc\service_table.h" />
++    <ClInclude Include="..\..\upnp\src\inc\soaplib.h" />
++    <ClInclude Include="..\..\upnp\src\inc\sock.h" />
++    <ClInclude Include="..\..\upnp\src\inc\ssdplib.h" />
++    <ClInclude Include="..\..\upnp\src\inc\statcodes.h" />
++    <ClInclude Include="..\..\upnp\src\inc\statuscodes.h" />
++    <ClInclude Include="..\..\upnp\src\inc\strintmap.h" />
++    <ClInclude Include="..\..\upnp\src\inc\sysdep.h" />
++    <ClInclude Include="..\..\upnp\src\inc\unixutil.h" />
++    <ClInclude Include="..\..\upnp\src\inc\upnpapi.h" />
++    <ClInclude Include="..\..\upnp\src\inc\upnputil.h" />
++    <ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h" />
++    <ClInclude Include="..\..\upnp\src\inc\uri.h" />
++    <ClInclude Include="..\..\upnp\src\inc\urlconfig.h" />
++    <ClInclude Include="..\..\upnp\src\inc\uuid.h" />
++    <ClInclude Include="..\..\upnp\src\inc\VirtualDir.h" />
++    <ClInclude Include="..\..\upnp\src\inc\webserver.h" />
++    <ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h" />
++    <ClInclude Include="..\inc\autoconfig.h" />
++    <ClInclude Include="..\inc\upnpconfig.h" />
++    <ClInclude Include="..\msvc\inttypes.h" />
++    <ClInclude Include="..\msvc\stdint.h" />
++  </ItemGroup>
++  <ItemGroup>
++    <ProjectReference Include="ixml.vcxproj">
++      <Project>{9c2c266d-35a3-465f-a297-0e21d54e5c89}</Project>
++      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
++    </ProjectReference>
++    <ProjectReference Include="threadutil.vcxproj">
++      <Project>{1d3eef7a-d248-48c0-b6b5-eca229fe4b3d}</Project>
++      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
++    </ProjectReference>
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/build/VS2015/libupnp.vcxproj.filters
+@@ -0,0 +1,302 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup>
++    <Filter Include="sources">
++      <UniqueIdentifier>{41280a8a-b659-4308-978d-6ae813d7eb2b}</UniqueIdentifier>
++      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
++    </Filter>
++    <Filter Include="headers">
++      <UniqueIdentifier>{de2960cd-eb77-44bd-a077-a21b478d1333}</UniqueIdentifier>
++      <Extensions>h;hpp;hxx;hm;inl</Extensions>
++    </Filter>
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\ixml\src\attr.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\document.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\element.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\FreeList.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\gena\gena_callback2.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\gena\gena_device.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixml.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\ixmlparser.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\LinkedList.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\uuid\md5.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\namedNodeMap.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\node.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\ixml\src\nodeList.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\soap\soap_common.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\soap\soap_device.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\sock.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\uuid\sysdep.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\ThreadPool.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\TimerThread.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\api\upnpapi.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\api\upnpdebug.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\api\UpnpString.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\api\upnptools.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\util\util.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\uuid\uuid.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\upnp\src\win_dll.c">
++      <Filter>sources</Filter>
++    </ClCompile>
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\inc\autoconfig.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\Callback.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\client_table.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\config.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\gena.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\gena_device.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\global.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\gmtdate.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\httpparser.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\msvc\inttypes.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\md5.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\membuffer.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\miniserver.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\netall.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\parsetools.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\server.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\service_table.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\soaplib.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\sock.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\ssdplib.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\statcodes.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\statuscodes.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\msvc\stdint.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\strintmap.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\sysdep.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\TemplateInclude.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\TemplateSource.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\TemplateUndef.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\unixutil.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\upnp.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\upnpapi.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\inc\upnpconfig.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\upnpdebug.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpGlobal.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpInet.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpStdInt.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpString.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\upnptools.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\inc\UpnpUniStd.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\upnputil.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\uri.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\urlconfig.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\uuid.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\VirtualDir.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\upnp\src\inc\webserver.h">
++      <Filter>headers</Filter>
++    </ClInclude>
++  </ItemGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/build/VS2015/threadutil.vcxproj
+@@ -0,0 +1,340 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|Win32">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="DebugDLL|x64">
++      <Configuration>DebugDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|Win32">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="ReleaseDLL|x64">
++      <Configuration>ReleaseDLL</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGuid>{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}</ProjectGuid>
++    <RootNamespace>threadutil</RootNamespace>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++    <WholeProgramOptimization>true</WholeProgramOptimization>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
++    <CharacterSet>NotSet</CharacterSet>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'" Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup>
++    <_ProjectFileVersion>14.0.24730.2</_ProjectFileVersion>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(SolutionDir)\$(Platform)\</OutDir>
++    <IntDir>$(SolutionDir)\$(Platform)\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <OutDir>$(SolutionDir)\x86\</OutDir>
++    <IntDir>$(SolutionDir)\x86\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\MSVC\$(Platform)\</OutDir>
++    <IntDir>$(ProjectDir)..\..\MSVC\$(Platform)\tmp\$(ProjectName)\</IntDir>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>Disabled</Optimization>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <MinimalRebuild>true</MinimalRebuild>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;$(ProjectDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);$(ProjectDir)..\..\..\bin\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <Midl>
++      <TargetEnvironment>X64</TargetEnvironment>
++    </Midl>
++    <ClCompile>
++      <Optimization>MaxSpeed</Optimization>
++      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
++      <IntrinsicFunctions>true</IntrinsicFunctions>
++      <AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;$(ProjectDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <PreprocessorDefinitions>_TIMESPEC_DEFINED;WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <StringPooling>true</StringPooling>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++      <FunctionLevelLinking>true</FunctionLevelLinking>
++      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
++      <ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
++      <WarningLevel>Level3</WarningLevel>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <CompileAs>CompileAsC</CompileAs>
++      <DisableSpecificWarnings>4244;4267;4311;4477;4996;</DisableSpecificWarnings>
++    </ClCompile>
++    <Lib>
++      <AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;$(OutDir);$(ProjectDir)..\..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
++      <AdditionalDependencies>pthreads-UWP.lib</AdditionalDependencies>
++      <AdditionalOptions>/IGNORE:4006 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\threadutil\src\FreeList.c" />
++    <ClCompile Include="..\..\threadutil\src\LinkedList.c" />
++    <ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
++    <ClCompile Include="..\..\threadutil\src\TimerThread.c" />
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\threadutil\inc\FreeList.h" />
++    <ClInclude Include="..\..\threadutil\inc\ithread.h" />
++    <ClInclude Include="..\..\threadutil\inc\LinkedList.h" />
++    <ClInclude Include="..\..\threadutil\inc\threadpool.h" />
++    <ClInclude Include="..\..\threadutil\inc\TimerThread.h" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+--- /dev/null
++++ b/build/VS2015/threadutil.vcxproj.filters
+@@ -0,0 +1,44 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup>
++    <Filter Include="Source Files">
++      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
++      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
++    </Filter>
++    <Filter Include="Header Files">
++      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
++      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
++    </Filter>
++  </ItemGroup>
++  <ItemGroup>
++    <ClCompile Include="..\..\threadutil\src\FreeList.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\LinkedList.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\ThreadPool.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++    <ClCompile Include="..\..\threadutil\src\TimerThread.c">
++      <Filter>Source Files</Filter>
++    </ClCompile>
++  </ItemGroup>
++  <ItemGroup>
++    <ClInclude Include="..\..\threadutil\inc\FreeList.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\threadutil\inc\ithread.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\threadutil\inc\LinkedList.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\threadutil\inc\threadpool.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++    <ClInclude Include="..\..\threadutil\inc\TimerThread.h">
++      <Filter>Header Files</Filter>
++    </ClInclude>
++  </ItemGroup>
++</Project>
+\ No newline at end of file
+--- a/build/inc/upnpconfig.h
++++ b/build/inc/upnpconfig.h
+@@ -65,7 +65,7 @@
+ #define _FILE_OFFSET_BITS 64
+ 
+ /** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+-#define _LARGEFILE_SOURCE 1
++/* #undef _LARGEFILE_SOURCE */
+ 
+ /** Large files support */
+ #define _LARGE_FILE_SOURCE /**/
+--- a/libupnp.pc.in
++++ b/libupnp.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libupnp
+ Description: Linux SDK for UPnP Devices
+ Version: @VERSION@
+-Libs: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -L${libdir} -lupnp -lthreadutil -lixml 
++Libs: @PTHREAD_CFLAGS@ -L${libdir} -lupnp -lthreadutil -lixml -liphlpapi @PTHREAD_LIBS@ 
+ Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp
+ 
+--- a/threadutil/inc/ThreadPool.h
++++ b/threadutil/inc/ThreadPool.h
+@@ -46,6 +46,7 @@
+ #include <errno.h>
+ 
+ #ifdef WIN32
++	#ifndef _TIMEZONE_DEFINED
+ 	#include <time.h>
+ 	struct timezone
+ 	{
+@@ -53,6 +54,7 @@
+ 		int  tz_dsttime;     /* type of dst correction */
+ 	};
+ 	int gettimeofday(struct timeval *tv, struct timezone *tz);
++	#endif
+ #else /* WIN32 */
+ 	#include <sys/param.h>
+ 	#include <sys/time.h> /* for gettimeofday() */
+--- a/upnp/inc/UpnpInet.h
++++ b/upnp/inc/UpnpInet.h
+@@ -15,11 +15,6 @@
+ 
+ #ifdef WIN32
+ 	#include <stdarg.h>
+-	#ifndef UPNP_USE_MSVCPP
+-		/* Removed: not required (and cause compilation issues) */
+-		#include <winbase.h>
+-		#include <windef.h>
+-	#endif
+ 	#include <winsock2.h>
+ 	#include <iphlpapi.h>
+ 	#include <ws2tcpip.h>
+--- a/upnp/inc/upnp.h
++++ b/upnp/inc/upnp.h
+@@ -61,6 +61,20 @@
+ 	/* Other systems ??? */
+ #endif
+ 
++#   if defined( __MINGW32__ )
++#       if !defined( _OFF_T_ )
++            typedef long long _off_t;
++            typedef _off_t off_t;
++#           define _OFF_T_
++#       else
++#           ifdef off_t
++#               undef off_t
++#           endif
++#           define off_t long long
++#       endif
++#   endif
++
++
+ #define LINE_SIZE  (size_t)180
+ #define NAME_SIZE  (size_t)256
+ #define MNFT_NAME_SIZE  64
+--- a/upnp/sample/common/sample_util.h
++++ b/upnp/sample/common/sample_util.h
+@@ -259,7 +259,7 @@ void linux_print(const char *format, ...)
+ #endif /* __cplusplus */
+ 
+ #ifdef WIN32
+-	#define snprintf	_snprintf
++	//#define snprintf	_snprintf
+ 	#define strcasecmp	stricmp
+ #endif
+ 
+--- a/upnp/src/api/upnpapi.c
++++ b/upnp/src/api/upnpapi.c
+@@ -341,8 +341,8 @@ static int UpnpInitPreamble(void)
+ 
+ #ifdef UPNP_HAVE_OPTSSDP
+ 	/* Create the NLS uuid. */
+-	uuid_create(&nls_uuid);
+-	uuid_unpack(&nls_uuid, gUpnpSdkNLSuuid);
++	uuid_upnp_create(&nls_uuid);
++	uuid_upnp_unpack(&nls_uuid, gUpnpSdkNLSuuid);
+ #endif /* UPNP_HAVE_OPTSSDP */
+ 
+ 	/* Initializes the handle list. */
+@@ -358,13 +358,13 @@ static int UpnpInitPreamble(void)
+ 		return retVal;
+ 	}
+ 
++#ifdef INTERNAL_WEB_SERVER
+ #ifdef INCLUDE_DEVICE_APIS
+ #if EXCLUDE_SOAP == 0
+ 	SetSoapCallback(soap_device_callback);
+ #endif
+ #endif /* INCLUDE_DEVICE_APIS */
+ 
+-#ifdef INTERNAL_WEB_SERVER
+ #if EXCLUDE_GENA == 0
+ 	SetGenaCallback(genaCallback);
+ #endif
+--- a/upnp/src/api/upnptools.c
++++ b/upnp/src/api/upnptools.c
+@@ -57,7 +57,7 @@
+ #define HEADER_LENGTH 2000
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ 
+ /*!
+--- a/upnp/src/gena/gena_ctrlpt.c
++++ b/upnp/src/gena/gena_ctrlpt.c
+@@ -53,7 +53,7 @@
+ #include "upnpapi.h"
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ 
+ extern ithread_mutex_t GlobalClientSubscribeMutex;
+@@ -561,8 +561,8 @@ int genaSubscribe(
+ 	}
+ 
+ 	/* generate client SID */
+-	uuid_create(&uid );
+-	uuid_unpack(&uid, temp_sid);
++	uuid_upnp_create(&uid );
++	uuid_upnp_unpack(&uid, temp_sid);
+ 	rc = snprintf(temp_sid2, sizeof(temp_sid2), "uuid:%s", temp_sid);
+ 	if (rc < 0 || (unsigned int) rc >= sizeof(temp_sid2)) {
+ 		return_code = UPNP_E_OUTOF_MEMORY;
+--- a/upnp/src/gena/gena_device.c
++++ b/upnp/src/gena/gena_device.c
+@@ -51,7 +51,7 @@
+ #include "uuid.h"
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ 
+ /*!
+@@ -1353,8 +1353,8 @@ void gena_process_subscription_request(
+ 	}
+ 
+ 	/* generate SID */
+-	uuid_create(&uid);
+-	uuid_unpack(&uid, temp_sid);
++	uuid_upnp_create(&uid);
++	uuid_upnp_unpack(&uid, temp_sid);
+ 	rc = snprintf(sub->sid, sizeof(sub->sid), "uuid:%s", temp_sid);
+ 
+ 	/* respond OK */
+--- a/upnp/src/genlib/miniserver/miniserver.c
++++ b/upnp/src/genlib/miniserver/miniserver.c
+@@ -68,6 +68,13 @@
+ /*! . */
+ #define APPLICATION_LISTENING_PORT 49152
+ 
++/* IPV6_V6ONLY is missing from MinGW, hack taken from
++ * http://svn.apache.org/repos/asf/apr/apr/trunk/network_io/win32/sockopt.c
++ */
++#ifndef IPV6_V6ONLY
++#define IPV6_V6ONLY 27
++#endif
++
+ struct mserv_request_t {
+ 	/*! Connection handle. */
+ 	SOCKET connfd;
+--- a/upnp/src/genlib/net/http/httpreadwrite.c
++++ b/upnp/src/genlib/net/http/httpreadwrite.c
+@@ -59,7 +59,7 @@
+ #ifdef WIN32
+ 	#include <malloc.h>
+ 	#define fseeko fseek
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #else
+ 	#include <arpa/inet.h>
+ 	#include <sys/types.h>
+@@ -2146,7 +2146,7 @@ void get_sdk_info(OUT char *info, IN size_t infoSize)
+ #ifdef WIN32
+ 	OSVERSIONINFO versioninfo;
+ 	versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+-
++#if (WINAPI_FAMILY_APP != WINAPI_FAMILY_PC_APP)
+ 	if (GetVersionEx(&versioninfo) != 0)
+ 		snprintf(info, infoSize,
+ 			"%d.%d.%d %d/%s, UPnP/1.0, Portable SDK for UPnP devices/"
+@@ -2156,6 +2156,10 @@ void get_sdk_info(OUT char *info, IN size_t infoSize)
+ 	else
+ 		*info = '\0';
+ #else
++    snprintf(info, infoSize, "%d.%d.%d %d/%s, UPnP/1.0, Portable SDK for UPnP devices/" PACKAGE_VERSION "\r\n",
++        0, 0, 0, 0, 0);
++#endif
++#else
+ 	int ret_code;
+ 	struct utsname sys_info;
+ 
+--- a/upnp/src/genlib/net/http/webserver.c
++++ b/upnp/src/genlib/net/http/webserver.c
+@@ -63,7 +63,7 @@
+ #include <sys/stat.h>
+ 
+ #ifdef WIN32
+-	 #define snprintf _snprintf
++	 //#define snprintf _snprintf
+ #endif
+ 
+ /*!
+--- a/upnp/src/genlib/net/uri/uri.c
++++ b/upnp/src/genlib/net/uri/uri.c
+@@ -45,7 +45,7 @@
+ 	#endif
+ #endif
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ #include <assert.h>
+ 
+--- a/upnp/src/inc/upnputil.h
++++ b/upnp/src/inc/upnputil.h
+@@ -130,7 +130,7 @@ void linecopylen(
+ 		#define strncasecmp		strnicmp
+ 		#define sleep(a)		Sleep((a)*1000)
+ 		#define usleep(a)		Sleep((a)/1000)
+-		#define strerror_r(a,b,c)	(strerror_s((b),(c),(a)))
++		#define strerror_r(a,b,c)       strncpy( b, strerror(a), c)
+ 	#else
+ 		#define max(a, b)   (((a)>(b))? (a):(b))
+ 		#define min(a, b)   (((a)<(b))? (a):(b))
+--- a/upnp/src/inc/uuid.h
++++ b/upnp/src/inc/uuid.h
+@@ -41,14 +41,14 @@ typedef struct _uuid_upnp {
+ /*!
+  * \brief Generate a UUID.
+  */
+-int uuid_create(
++int uuid_upnp_create(
+ 	/*! . */
+ 	uuid_upnp * id);
+ 
+ /*!
+  * \brief Out will be xxxx-xx-xx-xx-xxxxxx format.
+  */
+-void uuid_unpack(
++void uuid_upnp_unpack(
+ 	/*! . */
+ 	uuid_upnp * u,
+ 	/*! . */
+@@ -57,7 +57,7 @@ void uuid_unpack(
+ /*!
+  * \brief Create a UUID using a "name" from a "name space"
+  */
+-void uuid_create_from_name(
++void uuid_upnp_create_from_name(
+ 	/*! Resulting UUID. */
+ 	uuid_upnp * uid,
+ 	/*! UUID to serve as context, so identical names from different name
+@@ -78,7 +78,7 @@ void uuid_create_from_name(
+  *
+  * \note Lexical ordering is not temporal ordering!
+  */
+-int uuid_compare(
++int uuid_upnp_compare(
+ 	/*! . */
+ 	uuid_upnp * u1,
+ 	/*! . */
+
+--- a/upnp/src/soap/soap_device.c
++++ b/upnp/src/soap/soap_device.c
+@@ -49,7 +49,7 @@
+ #include "upnpapi.h"
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ 
+ /*! timeout duration in secs for transmission/reception */
+--- a/upnp/src/ssdp/ssdp_ctrlpt.c
++++ b/upnp/src/ssdp/ssdp_ctrlpt.c
+@@ -59,7 +59,7 @@
+ 
+ #ifdef WIN32
+ #include <string.h>
+-#define snprintf _snprintf
++//#define snprintf _snprintf
+ #endif /* WIN32 */
+ 
+ /*!
+--- a/upnp/src/ssdp/ssdp_device.c
++++ b/upnp/src/ssdp/ssdp_device.c
+@@ -57,7 +57,7 @@
+ #include <string.h>
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif
+ 
+ #define MSGTYPE_SHUTDOWN	0
+--- a/upnp/src/ssdp/ssdp_server.c
++++ b/upnp/src/ssdp/ssdp_server.c
+@@ -41,7 +41,7 @@
+ #ifndef WIN32
+ 	#include <sys/param.h>
+ #else
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #endif /* WIN32 */
+ 
+ #include "config.h"
+@@ -69,6 +69,13 @@
+ 	#endif /* UPNP_ENABLE_IPV6 */
+ #endif /* INCLUDE_CLIENT_APIS */
+ 
++/* IPV6_V6ONLY is missing from MinGW, hack taken from
++ * http://svn.apache.org/repos/asf/apr/apr/trunk/network_io/win32/sockopt.c
++ */
++#ifndef IPV6_V6ONLY
++#define IPV6_V6ONLY 27
++#endif
++
+ void RequestHandler();
+ 
+ enum Listener {
+--- a/upnp/src/urlconfig/urlconfig.c
++++ b/upnp/src/urlconfig/urlconfig.c
+@@ -50,7 +50,7 @@
+ #include <stdio.h>
+ 
+ #ifdef WIN32
+-	#define snprintf _snprintf
++	//#define snprintf _snprintf
+ #else
+ 	#include <sys/types.h>
+ #endif
+--- a/upnp/src/uuid/sysdep.c
++++ b/upnp/src/uuid/sysdep.c
+@@ -30,6 +30,8 @@
+ #include <string.h>
+ #include <stdio.h>
+ 
++#include <Winsock2.h>
++
+ /*!
+  * \brief System dependent call to get IEEE node ID.
+  *
+@@ -93,7 +95,9 @@ void get_random_info(unsigned char seed[16])
+ 	/* Initialize memory area so that valgrind does not complain */
+ 	memset(&r, 0, sizeof r);
+ 	/* memory usage stats */
+-	GlobalMemoryStatus( &r.m );
++#if (WINAPI_FAMILY_APP != WINAPI_FAMILY_PC_APP)
++    GlobalMemoryStatus( &r.m );
++#endif
+ 	/* random system stats */
+ 	GetSystemInfo( &r.s );
+ 	/* 100ns resolution (nominally) time of day */
+@@ -101,9 +105,13 @@ void get_random_info(unsigned char seed[16])
+ 	/* high resolution performance counter */
+ 	QueryPerformanceCounter( &r.pc );
+ 	/* milliseconds since last boot */
+-	r.tc = GetTickCount();
++	r.tc = GetTickCount64();
+ 	r.l = MAX_COMPUTERNAME_LENGTH + 1;
+-	GetComputerName( r.hostname, &r.l );
++#if (WINAPI_FAMILY_APP != WINAPI_FAMILY_PC_APP)
++    GetComputerName( r.hostname, &r.l );
++#else
++    GetHostNameW( r.hostname, &r.l );
++#endif
+ 	/* MD5 it */
+ 	MD5Init(&c);
+ 	MD5Update(&c, (unsigned char *)(&r), sizeof r);
+--- a/upnp/src/uuid/uuid.c
++++ b/upnp/src/uuid/uuid.c
+@@ -50,7 +50,7 @@ static uint16_t true_random(void);
+ /*!
+  * \brief Generator of a UUID.
+  */
+-int uuid_create(uuid_upnp * uid)
++int uuid_upnp_create(uuid_upnp * uid)
+ {
+ 	uuid_time_t timestamp;
+ 	uuid_time_t last_time;
+@@ -82,7 +82,7 @@ int uuid_create(uuid_upnp * uid)
+ 	return 1;
+ };
+ 
+-void uuid_unpack(uuid_upnp * u, char *out)
++void uuid_upnp_unpack(uuid_upnp * u, char *out)
+ {
+ 	sprintf(out,
+ 		"%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x",
+@@ -221,7 +221,7 @@ static uint16_t true_random(void)
+ /*!
+  * \brief Create a UUID using a "name" from a "name space".
+  */
+-void uuid_create_from_name(
++void uuid_upnp_create_from_name(
+ 	/*! resulting UUID. */
+ 	uuid_upnp *uid,
+ 	/*! UUID to serve as context, so identical names from different name
+@@ -280,7 +280,7 @@ void format_uuid_v3(uuid_upnp *uid, unsigned char hash[16])
+  *
+  * Note: Lexical ordering is not temporal ordering!
+  */
+-int uuid_compare(uuid_upnp *u1, uuid_upnp *u2)
++int uuid_upnp_compare(uuid_upnp *u1, uuid_upnp *u2)
+ {
+ 	int i;
+ 
+-- 
+2.8.1.windows.1
+
diff --git a/contrib/src/yaml-cpp/fetch_and_patch.bat b/contrib/src/yaml-cpp/fetch_and_patch.bat
new file mode 100644
index 0000000000000000000000000000000000000000..48c30912eb7a446cfe4ed00e46c31035aad2eb7e
--- /dev/null
+++ b/contrib/src/yaml-cpp/fetch_and_patch.bat
@@ -0,0 +1,15 @@
+set BUILD=%SRC%..\build
+
+set YAMLCPP_VERSION=24fa1b33805c9a91df0f32c46c28e314dd7ad96f
+set YAMLCPP_URL="https://github.com/jbeder/yaml-cpp.git"
+
+mkdir %BUILD%
+cd %BUILD%
+
+git clone %YAMLCPP_URL%
+cd yaml-cpp
+git checkout %YAMLCPP_VERSION%
+
+git apply --reject --whitespace=fix %SRC%\yaml-cpp\yaml-cpp-uwp.patch
+
+cd %SRC%
\ No newline at end of file
diff --git a/contrib/src/yaml-cpp/yaml-cpp-uwp.patch b/contrib/src/yaml-cpp/yaml-cpp-uwp.patch
new file mode 100644
index 0000000000000000000000000000000000000000..9ac4dd7aee83df732ec547e0ead9c50592fa82cb
--- /dev/null
+++ b/contrib/src/yaml-cpp/yaml-cpp-uwp.patch
@@ -0,0 +1,619 @@
+--- a/.gitignore
++++ b/.gitignore
+@@ -1 +1,250 @@
+-build/
++## Ignore Visual Studio temporary files, build results, and
++## files generated by popular Visual Studio add-ons.
++
++#output directories
++DebugLib/
++Debug/
++ReleaseLib/
++Release/
++.config/
++# User-specific files
++*.suo
++*.user
++*.userosscache
++*.sln.docstates
++*.VC.VC.opendb
++*.VC.db
++*.db
++*.filters
++
++# User-specific files (MonoDevelop/Xamarin Studio)
++*.userprefs
++
++# Build results
++[Dd]ebug/
++[Dd]ebugPublic/
++[Rr]elease/
++[Rr]eleases/
++x64/
++x86/
++bld/
++[Bb]in/
++[Oo]bj/
++Win32/
++
++# Visual Studio 2015 cache/options directory
++.vs/
++# Uncomment if you have tasks that create the project's static files in wwwroot
++#wwwroot/
++
++# MSTest test Results
++[Tt]est[Rr]esult*/
++[Bb]uild[Ll]og.*
++
++# NUNIT
++*.VisualState.xml
++TestResult.xml
++
++# Build Results of an ATL Project
++[Dd]ebugPS/
++[Rr]eleasePS/
++dlldata.c
++
++# DNX
++project.lock.json
++artifacts/
++
++#*_i.c
++#*_p.c
++#*_i.h
++*.ilk
++*.meta
++*.obj
++*.o
++*.pch
++*.pdb
++*.pgc
++*.pgd
++*.rsp
++*.sbr
++*.tlb
++*.tli
++*.tlh
++*.tmp
++*.tmp_proj
++*.log
++*.vspscc
++*.vssscc
++.builds
++*.pidb
++*.svclog
++*.scc
++
++# Chutzpah Test files
++_Chutzpah*
++
++# Visual C++ cache files
++ipch/
++*.aps
++*.ncb
++*.opendb
++*.opensdf
++*.sdf
++*.cachefile
++
++# Visual Studio profiler
++*.psess
++*.vsp
++*.vspx
++*.sap
++
++# TFS 2012 Local Workspace
++$tf/
++
++# Guidance Automation Toolkit
++*.gpState
++
++# ReSharper is a .NET coding add-in
++_ReSharper*/
++*.[Rr]e[Ss]harper
++*.DotSettings.user
++
++# JustCode is a .NET coding add-in
++.JustCode
++
++# TeamCity is a build add-in
++_TeamCity*
++
++# DotCover is a Code Coverage Tool
++*.dotCover
++
++# NCrunch
++_NCrunch_*
++.*crunch*.local.xml
++nCrunchTemp_*
++
++# MightyMoose
++*.mm.*
++AutoTest.Net/
++
++# Web workbench (sass)
++.sass-cache/
++
++# Installshield output folder
++[Ee]xpress/
++
++# DocProject is a documentation generator add-in
++DocProject/buildhelp/
++DocProject/Help/*.HxT
++DocProject/Help/*.HxC
++DocProject/Help/*.hhc
++DocProject/Help/*.hhk
++DocProject/Help/*.hhp
++DocProject/Help/Html2
++DocProject/Help/html
++
++# Click-Once directory
++publish/
++
++# Publish Web Output
++*.[Pp]ublish.xml
++*.azurePubxml
++# TODO: Comment the next line if you want to checkin your web deploy settings 
++# but database connection strings (with potential passwords) will be unencrypted
++*.pubxml
++*.publishproj
++
++# NuGet Packages
++*.nupkg
++# The packages folder can be ignored because of Package Restore
++**/packages/*
++# except build/, which is used as an MSBuild target.
++!**/packages/build/
++# Uncomment if necessary however generally it will be regenerated when needed
++#!**/packages/repositories.config
++# NuGet v3's project.json files produces more ignoreable files
++*.nuget.props
++*.nuget.targets
++
++# Microsoft Azure Build Output
++csx/
++*.build.csdef
++
++# Microsoft Azure Emulator
++ecf/
++rcf/
++
++# Microsoft Azure ApplicationInsights config file
++ApplicationInsights.config
++
++# Windows Store app package directory
++AppPackages/
++BundleArtifacts/
++
++# Visual Studio cache files
++# files ending in .cache can be ignored
++*.[Cc]ache
++# but keep track of directories ending in .cache
++!*.[Cc]ache/
++
++# Others
++ClientBin/
++~$*
++*~
++*.dbmdl
++*.dbproj.schemaview
++*.pfx
++*.publishsettings
++node_modules/
++orleans.codegen.cs
++
++# RIA/Silverlight projects
++Generated_Code/
++
++# Backup & report files from converting an old project file
++# to a newer Visual Studio version. Backup files are not needed,
++# because we have git ;-)
++_UpgradeReport_Files/
++Backup*/
++UpgradeLog*.XML
++UpgradeLog*.htm
++
++# SQL Server files
++*.mdf
++*.ldf
++
++# Business Intelligence projects
++*.rdl.data
++*.bim.layout
++*.bim_*.settings
++
++# Microsoft Fakes
++FakesAssemblies/
++
++# GhostDoc plugin setting file
++*.GhostDoc.xml
++
++# Node.js Tools for Visual Studio
++.ntvs_analysis.dat
++
++# Visual Studio 6 build log
++*.plg
++
++# Visual Studio 6 workspace options file
++*.opt
++
++# Visual Studio LightSwitch build output
++**/*.HTMLClient/GeneratedArtifacts
++**/*.DesktopClient/GeneratedArtifacts
++**/*.DesktopClient/ModelManifest.xml
++**/*.Server/GeneratedArtifacts
++**/*.Server/ModelManifest.xml
++_Pvt_Extensions
++
++# Paket dependency manager
++.paket/paket.exe
++
++# FAKE - F# Make
++.fake/
++
++!config.h
+\ No newline at end of file
+--- /dev/null
++++ b/MSVC/yaml-cpp.sln
+@@ -0,0 +1,27 @@
++Microsoft Visual Studio Solution File, Format Version 12.00
++# Visual Studio 14
++VisualStudioVersion = 14.0.25123.0
++MinimumVisualStudioVersion = 10.0.40219.1
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "yaml-cpp.vcxproj", "{0C4EAC26-4AAC-3525-BA45-916F44CFD660}"
++EndProject
++Global
++	GlobalSection(SolutionConfigurationPlatforms) = preSolution
++		Debug|Win32 = Debug|Win32
++		Debug|x64 = Debug|x64
++		Release|Win32 = Release|Win32
++		Release|x64 = Release|x64
++	EndGlobalSection
++	GlobalSection(ProjectConfigurationPlatforms) = postSolution
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Debug|Win32.ActiveCfg = Debug|Win32
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Debug|Win32.Build.0 = Debug|Win32
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Debug|x64.ActiveCfg = Debug|x64
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Debug|x64.Build.0 = Debug|x64
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Release|Win32.ActiveCfg = Release|Win32
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Release|Win32.Build.0 = Release|Win32
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Release|x64.ActiveCfg = Release|x64
++		{0C4EAC26-4AAC-3525-BA45-916F44CFD660}.Release|x64.Build.0 = Release|x64
++	EndGlobalSection
++	GlobalSection(SolutionProperties) = preSolution
++		HideSolutionNode = FALSE
++	EndGlobalSection
++EndGlobal
+--- /dev/null
++++ b/MSVC/yaml-cpp.vcxproj
+@@ -0,0 +1,327 @@
++<?xml version="1.0" encoding="utf-8"?>
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++  <ItemGroup Label="ProjectConfigurations">
++    <ProjectConfiguration Include="Debug|Win32">
++      <Configuration>Debug</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Debug|x64">
++      <Configuration>Debug</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|Win32">
++      <Configuration>Release</Configuration>
++      <Platform>Win32</Platform>
++    </ProjectConfiguration>
++    <ProjectConfiguration Include="Release|x64">
++      <Configuration>Release</Configuration>
++      <Platform>x64</Platform>
++    </ProjectConfiguration>
++  </ItemGroup>
++  <PropertyGroup Label="Globals">
++    <ProjectGUID>{0C4EAC26-4AAC-3525-BA45-916F44CFD660}</ProjectGUID>
++    <Keyword>Win32Proj</Keyword>
++    <Platform>Win32</Platform>
++    <ProjectName>yaml-cpp</ProjectName>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>MultiByte</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>MultiByte</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>MultiByte</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <UseOfMfc>false</UseOfMfc>
++    <CharacterSet>MultiByte</CharacterSet>
++    <PlatformToolset>v140</PlatformToolset>
++  </PropertyGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
++  <ImportGroup Label="ExtensionSettings">
++  </ImportGroup>
++  <ImportGroup Label="PropertySheets">
++    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++  </ImportGroup>
++  <PropertyGroup Label="UserMacros" />
++  <PropertyGroup>
++    <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
++    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
++    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
++    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)d</TargetName>
++    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
++    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.lib</TargetExt>
++    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
++    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
++    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)</TargetName>
++    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
++    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.lib</TargetExt>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <OutDir>$(SolutionDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <OutDir>$(ProjectDir)..\..\lib\$(PlatformTarget)\</OutDir>
++  </PropertyGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
++    <ClCompile>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <AssemblerListingLocation>Debug/</AssemblerListingLocation>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <CompileAs>CompileAsCpp</CompileAs>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <DisableSpecificWarnings>4127;4355</DisableSpecificWarnings>
++      <ExceptionHandling>Sync</ExceptionHandling>
++      <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
++      <Optimization>Disabled</Optimization>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <RuntimeTypeInfo>true</RuntimeTypeInfo>
++      <WarningLevel>Level3</WarningLevel>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ResourceCompile>
++    <Midl>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
++      <HeaderFileName>%(Filename).h</HeaderFileName>
++      <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
++      <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
++      <ProxyFileName>%(Filename)_p.c</ProxyFileName>
++    </Midl>
++    <Lib>
++      <AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
++    <ClCompile>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <AssemblerListingLocation>Debug/</AssemblerListingLocation>
++      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
++      <CompileAs>CompileAsCpp</CompileAs>
++      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
++      <DisableSpecificWarnings>4127;4355</DisableSpecificWarnings>
++      <ExceptionHandling>Sync</ExceptionHandling>
++      <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
++      <Optimization>Disabled</Optimization>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <RuntimeTypeInfo>true</RuntimeTypeInfo>
++      <WarningLevel>Level3</WarningLevel>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ResourceCompile>
++    <Midl>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
++      <HeaderFileName>%(Filename).h</HeaderFileName>
++      <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
++      <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
++      <ProxyFileName>%(Filename)_p.c</ProxyFileName>
++    </Midl>
++    <Lib>
++      <AdditionalOptions> /machine:X64 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
++    <ClCompile>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <AssemblerListingLocation>Release/</AssemblerListingLocation>
++      <CompileAs>CompileAsCpp</CompileAs>
++      <DisableSpecificWarnings>4127;4355;4267;</DisableSpecificWarnings>
++      <ExceptionHandling>Sync</ExceptionHandling>
++      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
++      <Optimization>MaxSpeed</Optimization>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <RuntimeTypeInfo>true</RuntimeTypeInfo>
++      <WarningLevel>Level3</WarningLevel>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <DebugInformationFormat>
++      </DebugInformationFormat>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ResourceCompile>
++    <Midl>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
++      <HeaderFileName>%(Filename).h</HeaderFileName>
++      <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
++      <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
++      <ProxyFileName>%(Filename)_p.c</ProxyFileName>
++    </Midl>
++    <Lib>
++      <AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(SolutionDir)..\..\include
++xcopy /S /Y $(SolutionDir)..\include\*.h $(SolutionDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++    <ClCompile>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <AssemblerListingLocation>Release/</AssemblerListingLocation>
++      <CompileAs>CompileAsCpp</CompileAs>
++      <DisableSpecificWarnings>4127;4355;4267;</DisableSpecificWarnings>
++      <ExceptionHandling>Sync</ExceptionHandling>
++      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
++      <Optimization>MaxSpeed</Optimization>
++      <PrecompiledHeader>NotUsing</PrecompiledHeader>
++      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <RuntimeTypeInfo>true</RuntimeTypeInfo>
++      <WarningLevel>Level3</WarningLevel>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <ObjectFileName>$(IntDir)</ObjectFileName>
++      <DebugInformationFormat>
++      </DebugInformationFormat>
++    </ClCompile>
++    <ResourceCompile>
++      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32;_WINDOWS;WIN32;_WINDOWS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++    </ResourceCompile>
++    <Midl>
++      <AdditionalIncludeDirectories>..\src;..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
++      <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
++      <HeaderFileName>%(Filename).h</HeaderFileName>
++      <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
++      <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
++      <ProxyFileName>%(Filename)_p.c</ProxyFileName>
++    </Midl>
++    <Lib>
++      <AdditionalOptions> /machine:X64 %(AdditionalOptions)</AdditionalOptions>
++    </Lib>
++    <PostBuildEvent>
++      <Command>mkdir $(ProjectDir)..\..\include
++xcopy /S /Y $(ProjectDir)..\include\*.h $(ProjectDir)..\..\include</Command>
++    </PostBuildEvent>
++  </ItemDefinitionGroup>
++  <ItemGroup>
++    <ClInclude Include="..\include\yaml-cpp\anchor.h" />
++    <ClInclude Include="..\include\yaml-cpp\binary.h" />
++    <ClInclude Include="..\include\yaml-cpp\contrib\anchordict.h" />
++    <ClInclude Include="..\include\yaml-cpp\contrib\graphbuilder.h" />
++    <ClInclude Include="..\include\yaml-cpp\dll.h" />
++    <ClInclude Include="..\include\yaml-cpp\emitfromevents.h" />
++    <ClInclude Include="..\include\yaml-cpp\emitter.h" />
++    <ClInclude Include="..\include\yaml-cpp\emitterdef.h" />
++    <ClInclude Include="..\include\yaml-cpp\emittermanip.h" />
++    <ClInclude Include="..\include\yaml-cpp\emitterstyle.h" />
++    <ClInclude Include="..\include\yaml-cpp\eventhandler.h" />
++    <ClInclude Include="..\include\yaml-cpp\exceptions.h" />
++    <ClInclude Include="..\include\yaml-cpp\mark.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\convert.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\bool_type.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\impl.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\iterator.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\iterator_fwd.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\memory.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\node.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\node_data.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\node_iterator.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\detail\node_ref.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\emit.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\impl.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\iterator.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\node.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\parse.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\ptr.h" />
++    <ClInclude Include="..\include\yaml-cpp\node\type.h" />
++    <ClInclude Include="..\include\yaml-cpp\noncopyable.h" />
++    <ClInclude Include="..\include\yaml-cpp\null.h" />
++    <ClInclude Include="..\include\yaml-cpp\ostream_wrapper.h" />
++    <ClInclude Include="..\include\yaml-cpp\parser.h" />
++    <ClInclude Include="..\include\yaml-cpp\stlemitter.h" />
++    <ClInclude Include="..\include\yaml-cpp\traits.h" />
++    <ClInclude Include="..\include\yaml-cpp\yaml.h" />
++    <ClInclude Include="..\src\collectionstack.h" />
++    <ClInclude Include="..\src\directives.h" />
++    <ClInclude Include="..\src\emitterstate.h" />
++    <ClInclude Include="..\src\emitterutils.h" />
++    <ClInclude Include="..\src\exp.h" />
++    <ClInclude Include="..\src\indentation.h" />
++    <ClInclude Include="..\src\nodebuilder.h" />
++    <ClInclude Include="..\src\nodeevents.h" />
++    <ClInclude Include="..\src\ptr_stack.h" />
++    <ClInclude Include="..\src\ptr_vector.h" />
++    <ClInclude Include="..\src\regeximpl.h" />
++    <ClInclude Include="..\src\regex_yaml.h" />
++    <ClInclude Include="..\src\scanner.h" />
++    <ClInclude Include="..\src\scanscalar.h" />
++    <ClInclude Include="..\src\scantag.h" />
++    <ClInclude Include="..\src\setting.h" />
++    <ClInclude Include="..\src\singledocparser.h" />
++    <ClInclude Include="..\src\stream.h" />
++    <ClInclude Include="..\src\streamcharsource.h" />
++    <ClInclude Include="..\src\stringsource.h" />
++    <ClInclude Include="..\src\tag.h" />
++    <ClInclude Include="..\src\token.h" />
++    <ClInclude Include="..\src\contrib\graphbuilderadapter.h" />
++    <ClCompile Include="..\src\binary.cpp" />
++    <ClCompile Include="..\src\convert.cpp" />
++    <ClCompile Include="..\src\directives.cpp" />
++    <ClCompile Include="..\src\emit.cpp" />
++    <ClCompile Include="..\src\emitfromevents.cpp" />
++    <ClCompile Include="..\src\emitter.cpp" />
++    <ClCompile Include="..\src\emitterstate.cpp" />
++    <ClCompile Include="..\src\emitterutils.cpp" />
++    <ClCompile Include="..\src\exp.cpp" />
++    <ClCompile Include="..\src\memory.cpp" />
++    <ClCompile Include="..\src\node.cpp" />
++    <ClCompile Include="..\src\nodebuilder.cpp" />
++    <ClCompile Include="..\src\nodeevents.cpp" />
++    <ClCompile Include="..\src\node_data.cpp" />
++    <ClCompile Include="..\src\null.cpp" />
++    <ClCompile Include="..\src\ostream_wrapper.cpp" />
++    <ClCompile Include="..\src\parse.cpp" />
++    <ClCompile Include="..\src\parser.cpp" />
++    <ClCompile Include="..\src\regex_yaml.cpp" />
++    <ClCompile Include="..\src\scanner.cpp" />
++    <ClCompile Include="..\src\scanscalar.cpp" />
++    <ClCompile Include="..\src\scantag.cpp" />
++    <ClCompile Include="..\src\scantoken.cpp" />
++    <ClCompile Include="..\src\simplekey.cpp" />
++    <ClCompile Include="..\src\singledocparser.cpp" />
++    <ClCompile Include="..\src\stream.cpp" />
++    <ClCompile Include="..\src\tag.cpp" />
++    <ClCompile Include="..\src\contrib\graphbuilder.cpp" />
++    <ClCompile Include="..\src\contrib\graphbuilderadapter.cpp" />
++  </ItemGroup>
++  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
++  <ImportGroup Label="ExtensionTargets">
++  </ImportGroup>
++</Project>
+\ No newline at end of file
+-- 
+2.8.1.windows.1
+