diff options
| author | Odd Stranne <odd@mullvad.net> | 2019-12-03 10:07:20 +0100 |
|---|---|---|
| committer | Odd Stranne <odd@mullvad.net> | 2019-12-04 13:07:57 +0100 |
| commit | 877f34593b857e3f1d81d9acce003e2ededbda1d (patch) | |
| tree | 6b0f78b1c6e9b0b0dc437434a37bd8fd8af969e6 /windows/shared | |
| parent | 80ce050ad2eee528ded8d5c1d2211534fe7485ae (diff) | |
| download | mullvadvpn-877f34593b857e3f1d81d9acce003e2ededbda1d.tar.xz mullvadvpn-877f34593b857e3f1d81d9acce003e2ededbda1d.zip | |
Update shared logging in C++
Diffstat (limited to 'windows/shared')
| -rw-r--r-- | windows/shared/shared.sln | 47 | ||||
| -rw-r--r-- | windows/shared/src/shared/logsink.h | 26 | ||||
| -rw-r--r-- | windows/shared/src/shared/logsinkadapter.h | 52 | ||||
| -rw-r--r-- | windows/shared/src/shared/network/interfaceutils.cpp | 177 | ||||
| -rw-r--r-- | windows/shared/src/shared/network/interfaceutils.h | 79 | ||||
| -rw-r--r-- | windows/shared/src/shared/shared.vcxproj | 197 | ||||
| -rw-r--r-- | windows/shared/src/shared/shared.vcxproj.filters | 23 | ||||
| -rw-r--r-- | windows/shared/src/shared/stdafx.cpp | 8 | ||||
| -rw-r--r-- | windows/shared/src/shared/stdafx.h | 15 | ||||
| -rw-r--r-- | windows/shared/src/shared/targetver.h | 12 |
10 files changed, 0 insertions, 636 deletions
diff --git a/windows/shared/shared.sln b/windows/shared/shared.sln deleted file mode 100644 index d664af8399..0000000000 --- a/windows/shared/shared.sln +++ /dev/null @@ -1,47 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29324.140 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "src\shared\shared.vcxproj", "{EE69EA4A-CF71-4B88-866B-957F60C4CE0D}" - ProjectSection(ProjectDependencies) = postProject - {B52E2D10-A94A-4605-914A-2DCEF6A757EF} = {B52E2D10-A94A-4605-914A-2DCEF6A757EF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcommon", "..\windows-libraries\src\libcommon\libcommon.vcxproj", "{B52E2D10-A94A-4605-914A-2DCEF6A757EF}" -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 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x64.ActiveCfg = Debug|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x64.Build.0 = Debug|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x64.Deploy.0 = Debug|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x86.ActiveCfg = Debug|Win32 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x86.Build.0 = Debug|Win32 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Debug|x86.Deploy.0 = Debug|Win32 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x64.ActiveCfg = Release|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x64.Build.0 = Release|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x64.Deploy.0 = Release|x64 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x86.ActiveCfg = Release|Win32 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x86.Build.0 = Release|Win32 - {EE69EA4A-CF71-4B88-866B-957F60C4CE0D}.Release|x86.Deploy.0 = Release|Win32 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Debug|x64.ActiveCfg = Debug|x64 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Debug|x64.Build.0 = Debug|x64 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Debug|x86.ActiveCfg = Debug|Win32 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Debug|x86.Build.0 = Debug|Win32 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Release|x64.ActiveCfg = Release|x64 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Release|x64.Build.0 = Release|x64 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Release|x86.ActiveCfg = Release|Win32 - {B52E2D10-A94A-4605-914A-2DCEF6A757EF}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A28F3793-15A7-4EE5-A899-373DF084D91F} - EndGlobalSection -EndGlobal diff --git a/windows/shared/src/shared/logsink.h b/windows/shared/src/shared/logsink.h deleted file mode 100644 index 16a84d4def..0000000000 --- a/windows/shared/src/shared/logsink.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -// -// This file is shared between DLL modules to help define their public interface. -// It should always be C-compatible. -// - -enum MULLVAD_LOG_SINK_SEVERITY -{ - MULLVAD_LOG_SINK_SEVERITY_ERROR = 0, - MULLVAD_LOG_SINK_SEVERITY_WARNING, - MULLVAD_LOG_SINK_SEVERITY_INFO, - MULLVAD_LOG_SINK_SEVERITY_TRACE -}; - -// -// The log sink is registered with a DLL during e.g. initialization. -// It may later be activated as a direct or indirect result of calling into the DLL. -// -// The parameters are: -// -// `MULLVAD_LOG_SINK_SEVERITY` - Severity of the message. -// `const char *` - The message itself. -// `void *` - The sink context that was registered along with the sink. -// -typedef void (__stdcall *MullvadLogSink)(MULLVAD_LOG_SINK_SEVERITY, const char *, void *); diff --git a/windows/shared/src/shared/logsinkadapter.h b/windows/shared/src/shared/logsinkadapter.h deleted file mode 100644 index cbeca9e148..0000000000 --- a/windows/shared/src/shared/logsinkadapter.h +++ /dev/null @@ -1,52 +0,0 @@ -#include "logsink.h" -#include <libcommon/logging/logsink.h> - -namespace shared -{ - -// -// Adapt common::logging::LogSink C++ world to -// MullvadLogSink C world. -// -class LogSinkAdapter : public common::logging::LogSink -{ -public: - - LogSinkAdapter(MullvadLogSink target, void *context) - : LogSink(MakeAdapter(target, context)) - { - } - -private: - - static common::logging::LogTarget MakeAdapter(MullvadLogSink target, void *context) - { - return [target, context](common::logging::Severity s, const char *msg) - { - if (nullptr == target) - { - return; - } - - const MULLVAD_LOG_SINK_SEVERITY severity = [s]() - { - switch (s) - { - case common::logging::Severity::Warning: - return MULLVAD_LOG_SINK_SEVERITY_WARNING; - case common::logging::Severity::Info: - return MULLVAD_LOG_SINK_SEVERITY_INFO; - case common::logging::Severity::Trace: - return MULLVAD_LOG_SINK_SEVERITY_TRACE; - case common::logging::Severity::Error: - default: - return MULLVAD_LOG_SINK_SEVERITY_ERROR; - } - }(); - - target(severity, msg, context); - }; - } -}; - -} diff --git a/windows/shared/src/shared/network/interfaceutils.cpp b/windows/shared/src/shared/network/interfaceutils.cpp deleted file mode 100644 index 6d56ec82d2..0000000000 --- a/windows/shared/src/shared/network/interfaceutils.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include "stdafx.h" -#include <sstream> -#include <algorithm> -#include "interfaceutils.h" -#include <libcommon/error.h> -#include <libcommon/string.h> - -namespace shared::network -{ - -InterfaceUtils::NetworkAdapter::NetworkAdapter( - const common::network::Nci &nci, - const std::shared_ptr<std::vector<uint8_t>> addressesBuffer, - const IP_ADAPTER_ADDRESSES &entry -) - : m_addressesBuffer(addressesBuffer) - , m_entry(entry) -{ - m_guid = common::string::ToWide(entry.AdapterName); - - try - { - // - // FIXME: - // Work around incorrect alias sometimes - // being returned on Windows 8. - // - // Steps to reproduce: - // 1. Install NDIS 6 TAP driver v9.00.00.21. - // 2. Update driver to v9.24.2.601. - // 3. Rename TAP adapter. - // - // GetAdaptersAddresses() returns a generic name - // for the *first* adapter instead of the correct - // one, whereas ConvertInterfaceAliasToLuid() and - // ConvertInterfaceLuidToAlias() yield correct values. - // - - IID guidObj = { 0 }; - if (S_OK != IIDFromString(&m_guid[0], &guidObj)) - { - throw std::runtime_error("IIDFromString() failed"); - } - - m_alias = nci.getConnectionName(guidObj); - } - catch (const std::exception &) - { - m_alias = entry.FriendlyName; - } - - m_name = entry.Description; -} - -//static -std::set<InterfaceUtils::NetworkAdapter> InterfaceUtils::GetAllAdapters(ULONG family, ULONG flags) -{ - ULONG bufferSize = 0; - - auto status = GetAdaptersAddresses(family, flags, nullptr, nullptr, &bufferSize); - - THROW_UNLESS(ERROR_BUFFER_OVERFLOW, status, "Probe for adapter listing buffer size"); - - // Memory is cheap, this avoids a looping construct. - bufferSize *= 2; - - auto buffer = std::make_shared<std::vector<uint8_t>>(bufferSize); - auto addresses = reinterpret_cast<PIP_ADAPTER_ADDRESSES>(&(*buffer)[0]); - - status = GetAdaptersAddresses(family, flags, nullptr, addresses, &bufferSize); - - THROW_UNLESS(ERROR_SUCCESS, status, "Retrieve adapter listing"); - - std::set<NetworkAdapter> adapters; - - common::network::Nci nci; - - for (auto it = addresses; nullptr != it; it = it->Next) - { - adapters.emplace(NetworkAdapter(nci, buffer, *it)); - } - - return adapters; -} - -//static -void InterfaceUtils::AddDeviceIpAddresses(NET_LUID device, const std::vector<SOCKADDR_INET> &addresses) -{ - for (const auto &address : addresses) - { - MIB_UNICASTIPADDRESS_ROW row; - InitializeUnicastIpAddressEntry(&row); - - row.InterfaceLuid = device; - row.Address = address; - - THROW_UNLESS(NO_ERROR, CreateUnicastIpAddressEntry(&row), "Assign IP address on network interface"); - } -} - -//static -std::set<InterfaceUtils::NetworkAdapter> -InterfaceUtils::GetTapAdapters(const std::set<NetworkAdapter>& adapters) -{ - std::set<NetworkAdapter> tapAdapters; - - for (const auto& adapter : adapters) - { - static const wchar_t name[] = L"TAP-Windows Adapter V9"; - - // - // Compare partial name, because once you start having more TAP adapters - // they're named "TAP-Windows Adapter V9 #2" and so on. - // - - if (0 == adapter.name().compare(0, _countof(name) - 1, name)) - { - tapAdapters.insert(adapter); - } - } - - return tapAdapters; -} - -//static -std::wstring InterfaceUtils::GetTapInterfaceAlias() -{ - // - // Look for TAP adapter with alias "Mullvad". - // - - using shared::network::InterfaceUtils; - - auto adapters = InterfaceUtils::GetTapAdapters(InterfaceUtils::GetAllAdapters( - AF_INET, - GAA_FLAG_SKIP_UNICAST | GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST - )); - - auto findByAlias = [](const std::set<InterfaceUtils::NetworkAdapter>& adapters, const std::wstring& alias) - { - const auto it = std::find_if(adapters.begin(), adapters.end(), [&alias](const InterfaceUtils::NetworkAdapter& candidate) - { - return 0 == _wcsicmp(candidate.alias().c_str(), alias.c_str()); - }); - - return it != adapters.end(); - }; - - static const wchar_t baseAlias[] = L"Mullvad"; - - if (findByAlias(adapters, baseAlias)) - { - return baseAlias; - } - - // - // Look for TAP adapter with alias "Mullvad-1", "Mullvad-2", etc. - // - - for (auto i = 0; i < 10; ++i) - { - std::wstringstream ss; - - ss << baseAlias << L"-" << i; - - const auto alias = ss.str(); - - if (findByAlias(adapters, alias)) - { - return alias; - } - } - - throw std::runtime_error("Unable to find TAP adapter"); -} - -} diff --git a/windows/shared/src/shared/network/interfaceutils.h b/windows/shared/src/shared/network/interfaceutils.h deleted file mode 100644 index 85a243d591..0000000000 --- a/windows/shared/src/shared/network/interfaceutils.h +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once - -#include <string> -#include <set> -#include <vector> -#include <memory> -#include <cstdint> - -// Secret include order to get most common networking structs/apis -// And avoiding compilation errors -#include <winsock2.h> -#include <windows.h> -#include <ws2def.h> -#include <ws2ipdef.h> -#include <iphlpapi.h> -#include <netioapi.h> -// end - -#include <libcommon/network/nci.h> - -namespace shared::network -{ - -class InterfaceUtils -{ - InterfaceUtils() = delete; - -public: - - class NetworkAdapter - { - - public: - - const std::wstring &guid() const { return m_guid; } - const std::wstring &name() const { return m_name; } - const std::wstring &alias() const { return m_alias; } - - bool operator<(const NetworkAdapter &rhs) const - { - return _wcsicmp(m_guid.c_str(), rhs.m_guid.c_str()) < 0; - } - - const IP_ADAPTER_ADDRESSES &raw() const - { - return m_entry; - } - - private: - - NetworkAdapter( - const common::network::Nci &nci, - const std::shared_ptr<std::vector<uint8_t>> addressesBuffer, - const IP_ADAPTER_ADDRESSES &entry - ); - - friend class InterfaceUtils; - - const IP_ADAPTER_ADDRESSES &m_entry; - std::shared_ptr<std::vector<uint8_t>> m_addressesBuffer; - - std::wstring m_guid; - std::wstring m_name; - std::wstring m_alias; - }; - - static std::set<NetworkAdapter> GetAllAdapters(ULONG family, ULONG flags); - - static void AddDeviceIpAddresses(NET_LUID device, const std::vector<SOCKADDR_INET> &addresses); - - static std::set<NetworkAdapter> GetTapAdapters(const std::set<NetworkAdapter> &adapters); - - // - // Determines alias of primary TAP adapter. - // - static std::wstring GetTapInterfaceAlias(); -}; - -} diff --git a/windows/shared/src/shared/shared.vcxproj b/windows/shared/src/shared/shared.vcxproj deleted file mode 100644 index a5dc7cf4f2..0000000000 --- a/windows/shared/src/shared/shared.vcxproj +++ /dev/null @@ -1,197 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="16.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"> - <VCProjectVersion>16.0</VCProjectVersion> - <ProjectGuid>{EE69EA4A-CF71-4B88-866B-957F60C4CE0D}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>shared</RootNamespace> - <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> - <ProjectName>shared</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</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|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(SolutionDir)bin\$(Platform)-$(Configuration)\</OutDir> - <IntDir>$(SolutionDir)bin\temp\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(SolutionDir)bin\$(Platform)-$(Configuration)\</OutDir> - <IntDir>$(SolutionDir)bin\temp\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(SolutionDir)bin\$(Platform)-$(Configuration)\</OutDir> - <IntDir>$(SolutionDir)bin\temp\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(SolutionDir)bin\$(Platform)-$(Configuration)\</OutDir> - <IntDir>$(SolutionDir)bin\temp\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../../windows-libraries/src/</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <LanguageStandard>stdcpplatest</LanguageStandard> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)-$(Configuration)\</AdditionalLibraryDirectories> - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../../windows-libraries/src/</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <LanguageStandard>stdcpplatest</LanguageStandard> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)-$(Configuration)\</AdditionalLibraryDirectories> - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../../windows-libraries/src/</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <LanguageStandard>stdcpplatest</LanguageStandard> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)-$(Configuration)\</AdditionalLibraryDirectories> - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <SDLCheck>true</SDLCheck> - <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../../windows-libraries/src/</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <LanguageStandard>stdcpplatest</LanguageStandard> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)-$(Configuration)\</AdditionalLibraryDirectories> - <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClInclude Include="logsink.h" /> - <ClInclude Include="ilogsink.h" /> - <ClInclude Include="network\interfaceutils.h" /> - <ClInclude Include="stdafx.h" /> - <ClInclude Include="targetver.h" /> - </ItemGroup> - <ItemGroup> - <ClCompile Include="network\interfaceutils.cpp" /> - <ClCompile Include="stdafx.cpp"> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">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 diff --git a/windows/shared/src/shared/shared.vcxproj.filters b/windows/shared/src/shared/shared.vcxproj.filters deleted file mode 100644 index 61b48a6937..0000000000 --- a/windows/shared/src/shared/shared.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <ClInclude Include="ilogsink.h" /> - <ClInclude Include="logsink.h" /> - <ClInclude Include="stdafx.h" /> - <ClInclude Include="targetver.h" /> - <ClInclude Include="network\interfaceutils.h"> - <Filter>network</Filter> - </ClInclude> - </ItemGroup> - <ItemGroup> - <ClCompile Include="stdafx.cpp" /> - <ClCompile Include="network\interfaceutils.cpp"> - <Filter>network</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <Filter Include="network"> - <UniqueIdentifier>{c36884fc-7afc-42a8-b852-c0aafcfcc1c2}</UniqueIdentifier> - </Filter> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/windows/shared/src/shared/stdafx.cpp b/windows/shared/src/shared/stdafx.cpp deleted file mode 100644 index c418cf5096..0000000000 --- a/windows/shared/src/shared/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// shared.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/windows/shared/src/shared/stdafx.h b/windows/shared/src/shared/stdafx.h deleted file mode 100644 index 59e4616a97..0000000000 --- a/windows/shared/src/shared/stdafx.h +++ /dev/null @@ -1,15 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -#include <windows.h> -#include <string> -#include <sstream> -#include <algorithm> diff --git a/windows/shared/src/shared/targetver.h b/windows/shared/src/shared/targetver.h deleted file mode 100644 index ae4a5c032c..0000000000 --- a/windows/shared/src/shared/targetver.h +++ /dev/null @@ -1,12 +0,0 @@ -#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 <WinSDKVer.h> - -#define _WIN32_WINNT _WIN32_WINNT_WIN7 - -#include <SDKDDKVer.h> |
