OCT 1. 删除多余工程
This commit is contained in:
parent
5a0ad17d75
commit
99e5ada54a
220
.clang-format
220
.clang-format
|
@ -1,220 +0,0 @@
|
|||
# ClangFormatConfigureSource: 'clang-format-file://D:/development/c/daemon_agent/.clang-format'
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
InsertBraces: true
|
||||
AlignArrayOfStructures: Left
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: true
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
PadOperators: true
|
||||
AlignCompound: true
|
||||
AlignConsecutiveBitFields: None
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
PadOperators: true
|
||||
AlignCompound: true
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: DontAlign
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
AttributeMacros:
|
||||
- __capability
|
||||
- __unused
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: true
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeConceptDeclarations: true
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 120
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: true
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DeriveLineEnding: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^<.*\.h>'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^<.*'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
||||
IncludeIsMainSourceRegex: ''
|
||||
IndentCaseLabels: true
|
||||
IndentCaseBlocks: false
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentRequiresClause: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertTrailingCommas: None
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Never
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 1000
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 140
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PointerAlignment: Right
|
||||
RawStringFormats:
|
||||
- Language: Cpp
|
||||
Delimiters:
|
||||
- cc
|
||||
- CC
|
||||
- cpp
|
||||
- Cpp
|
||||
- CPP
|
||||
- 'c++'
|
||||
- 'C++'
|
||||
CanonicalDelimiter: ''
|
||||
BasedOnStyle: google
|
||||
- Language: TextProto
|
||||
Delimiters:
|
||||
- pb
|
||||
- PB
|
||||
- proto
|
||||
- PROTO
|
||||
EnclosingFunctions:
|
||||
- EqualsProto
|
||||
- EquivToProto
|
||||
- PARSE_PARTIAL_TEXT_PROTO
|
||||
- PARSE_TEST_PROTO
|
||||
- PARSE_TEXT_PROTO
|
||||
- ParseTextOrDie
|
||||
- ParseTextProtoOrDie
|
||||
- ParseTestProto
|
||||
- ParsePartialTestProto
|
||||
CanonicalDelimiter: ''
|
||||
BasedOnStyle: google
|
||||
ReflowComments: false
|
||||
SortIncludes: Never
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 4
|
||||
SpacesInAngles: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
SpaceBeforeSquareBrackets: false
|
||||
BitFieldColonSpacing: Both
|
||||
Standard: Auto
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
SeparateDefinitionBlocks: Always
|
||||
WhitespaceSensitiveMacros:
|
||||
- STRINGIZE
|
||||
- PP_STRINGIZE
|
||||
- BOOST_PP_STRINGIZE
|
||||
- NS_SWIFT_NAME
|
||||
- CF_SWIFT_NAME
|
||||
TypenameMacros:
|
||||
- CONFIG_ITEM
|
||||
- PCONFIG_ITEM
|
|
@ -3,6 +3,7 @@
|
|||
################################################################################
|
||||
|
||||
/.vs
|
||||
/NetTunnelApp/bin/Debug/net6.0-windows
|
||||
/NetTunnelSDK/x64/Debug
|
||||
/x64/Debug
|
||||
/NetTunnelApp/bin
|
||||
/NetTunnelApp/obj/
|
||||
/NetTunnelSDK/x64/
|
||||
/x64/
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
xmlns:local="clr-namespace:NetTunnelApp"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</Application>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
|
@ -12,4 +14,4 @@ namespace NetTunnelApp
|
|||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ using System.Windows;
|
|||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:NetTunnelApp"
|
||||
mc:Ignorable="d"
|
||||
Title="NetTunnel" Height="450" Width="800" WindowStyle="ThreeDBorderWindow">
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Button Content="Button" HorizontalAlignment="Left" Margin="166,170,0,0" VerticalAlignment="Top" Height="47"
|
||||
Width="96" Click="Button_Click" />
|
||||
<Button Content="Button" HorizontalAlignment="Left" Margin="68,69,0,0" VerticalAlignment="Top" Height="48" Width="100" Click="Button_Click"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
@ -11,7 +12,6 @@ using System.Windows.Media;
|
|||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace NetTunnelApp
|
||||
{
|
||||
|
@ -23,15 +23,16 @@ namespace NetTunnelApp
|
|||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
string path = System.Environment.CurrentDirectory + "\\tunnelsdk.log";
|
||||
|
||||
NetTunnelLib.TunnelSDKInitEnv();
|
||||
|
||||
string path = System.Environment.CurrentDirectory + "\\tunnelsdk_" +
|
||||
string.Format("{0:yyyyMMdd_HHmm}", System.DateTime.Now) + ".log";
|
||||
NetTunnelLib.InitTunnelSDKLog(path, LogLevel.LOG_DEBUG);
|
||||
//IntPtr msg = TestMessage();
|
||||
//MessageBox.Show(Marshal.PtrToStringAnsi(msg));
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(NetTunnelLib.SetProtocolEncryptType(ProtoCryptoType.CRYPTO_NONE, "").ToString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<BaseOutputPath>C:\Users\HuangXin\Documents\development\visual_studio\NetworkTunnel\x64</BaseOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /y $(SolutionDir)x64\$(ConfigurationName)\*.dll $(TargetDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
// NetTunnelDemo.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include "../NetTunnelSDK/tunnel.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello World!\n";
|
||||
std::cout << TunnelSDKInitEnv();
|
||||
}
|
||||
|
||||
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
|
||||
// 调试程序: F5 或调试 >“开始调试”菜单
|
||||
|
||||
// 入门使用技巧:
|
||||
// 1. 使用解决方案资源管理器窗口添加/管理文件
|
||||
// 2. 使用团队资源管理器窗口连接到源代码管理
|
||||
// 3. 使用输出窗口查看生成输出和其他消息
|
||||
// 4. 使用错误列表窗口查看错误
|
||||
// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
|
||||
// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件
|
|
@ -1,140 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" 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>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{7cca5020-1e98-4aef-99a4-34c05592cfe1}</ProjectGuid>
|
||||
<RootNamespace>NetTunnelDemo</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</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" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="NetTunnelDemo.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NetTunnelSDK\NetTunnelSDK.vcxproj">
|
||||
<Project>{42aacc62-a37c-4b33-a687-d13c472cc980}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="NetTunnelDemo.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
|
@ -22,7 +22,7 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{42aacc62-a37c-4b33-a687-d13c472cc980}</ProjectGuid>
|
||||
<ProjectGuid>{1584bad4-dbec-43d2-bc06-08c23f02489a}</ProjectGuid>
|
||||
<RootNamespace>NetTunnelSDK</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
@ -120,10 +120,6 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(OutDir)$(TargetName)$(TargetExt) $(OutDir)net6.0-windows /y
|
||||
copy $(OutDir)fmtd.dll $(OutDir)net6.0-windows /y</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
|
@ -164,7 +160,9 @@ copy $(OutDir)fmtd.dll $(OutDir)net6.0-windows /y</Command>
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tunnel.cpp" />
|
||||
<ClCompile Include="tunnel.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="usrerr.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
|
|
|
@ -13,18 +13,6 @@
|
|||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件\tunnel">
|
||||
<UniqueIdentifier>{b280dda3-87fc-4338-9b3d-2d3aac834993}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\tunnel">
|
||||
<UniqueIdentifier>{887650f6-e4f9-49ee-9314-9e4244cd63a5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\log">
|
||||
<UniqueIdentifier>{eebf9d26-4829-4879-8a09-a84ab879607e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\logs">
|
||||
<UniqueIdentifier>{879be0d2-53a0-4003-bdb8-449de0caad96}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
|
@ -33,19 +21,19 @@
|
|||
<ClInclude Include="pch.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="misc.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tunnel.h">
|
||||
<Filter>头文件\tunnel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="logs\fmtlog.h">
|
||||
<Filter>头文件\log</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="logs\fmtlog-inl.h">
|
||||
<Filter>头文件\log</Filter>
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="usrerr.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="misc.h">
|
||||
<ClInclude Include="logs\fmtlog.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="logs\fmtlog-inl.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
@ -57,14 +45,14 @@
|
|||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tunnel.cpp">
|
||||
<Filter>源文件\tunnel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="logs\fmtlog.cc">
|
||||
<Filter>源文件\logs</Filter>
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="usrerr.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="logs\fmtlog.cc">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
// dllmain.cpp : 定义 DLL 应用程序的入口点。
|
||||
#include "pch.h"
|
||||
|
||||
#include "logs/fmtlog.h"
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
||||
switch (ul_reason_for_call) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
fmtlog::poll();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
||||
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
||||
// Windows 头文件
|
||||
#include <windows.h>
|
||||
#include <windows.h>
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
#include "pch.h"
|
||||
|
||||
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
|
||||
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
// 添加要在此处预编译的标头
|
||||
#include "framework.h"
|
||||
|
||||
#endif //PCH_H
|
||||
#endif //PCH_H
|
||||
|
|
|
@ -10,6 +10,7 @@ typedef struct
|
|||
{
|
||||
PROTO_CRYPTO_TYPE proCryptoType;
|
||||
char proKeyBuf[CRYPTO_MAX][256];
|
||||
fmtlog::LogLevel logLevel;
|
||||
} SDK_CONFIG, *PSDK_CONFIG;
|
||||
|
||||
static SDK_CONFIG g_globalConfig;
|
||||
|
@ -17,6 +18,7 @@ static SDK_CONFIG g_globalConfig;
|
|||
NETTUNNELSDK_API int TunnelSDKInitEnv()
|
||||
{
|
||||
memset(&g_globalConfig, 0, sizeof(SDK_CONFIG));
|
||||
g_globalConfig.logLevel = fmtlog::OFF;
|
||||
return ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -41,13 +43,26 @@ NETTUNNELSDK_API void InitTunnelSDKLog(const char* pLogFile, LOG_LEVEL level)
|
|||
fmtlog::setFlushDelay(1000000);
|
||||
fmtlog::setLogLevel(lv[level]);
|
||||
|
||||
g_globalConfig.logLevel = lv[level];
|
||||
|
||||
FMTLOG(lv[level], "Log({1}):{0}", buf, (int)level);
|
||||
}
|
||||
|
||||
NETTUNNELSDK_API void TunnelLogEnable(bool enLog)
|
||||
{
|
||||
if (enLog)
|
||||
{
|
||||
fmtlog::setLogLevel(g_globalConfig.logLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
fmtlog::setLogLevel(fmtlog::OFF);
|
||||
}
|
||||
}
|
||||
|
||||
NETTUNNELSDK_API int SetProtocolEncryptType(PROTO_CRYPTO_TYPE type, const char* pProKey)
|
||||
{
|
||||
if (type > CRYPTO_BASE64)
|
||||
if (type > CRYPTO_BASE64 && type < CRYPTO_MAX)
|
||||
{
|
||||
if (pProKey == nullptr || strlen(pProKey) < 8)
|
||||
{
|
||||
|
|
|
@ -33,11 +33,12 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
NETTUNNELSDK_API int __cdecl CreateTunnel(LPCSTR lpszMsg);
|
||||
NETTUNNELSDK_API const char*__cdecl TestMessage();
|
||||
NETTUNNELSDK_API const char* __cdecl TestMessage();
|
||||
NETTUNNELSDK_API int __cdecl Add(int a, int b);
|
||||
NETTUNNELSDK_API int __cdecl TunnelSDKInitEnv();
|
||||
NETTUNNELSDK_API int __cdecl SetProtocolEncryptType(PROTO_CRYPTO_TYPE type, const char* pProKey);
|
||||
NETTUNNELSDK_API void __cdecl InitTunnelSDKLog(const char* pLogFile, LOG_LEVEL level);
|
||||
NETTUNNELSDK_API void __cdecl TunnelLogEnable(bool enLog);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.33627.172
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetTunnelSDK", "NetTunnelSDK\NetTunnelSDK.vcxproj", "{42AACC62-A37C-4B33-A687-D13C472CC980}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetTunnelApp", "NetTunnelApp\NetTunnelApp.csproj", "{4999B360-F561-4B6D-A7B0-82EECE329089}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980} = {42AACC62-A37C-4B33-A687-D13C472CC980}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UTNetTunnelSDK", "UTNetTunnelSDK\UTNetTunnelSDK.vcxproj", "{6E425E69-15FA-474A-8798-054F0E0005E1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetTunnelDemo", "NetTunnelDemo\NetTunnelDemo.vcxproj", "{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|ARM64.ActiveCfg = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|ARM64.Build.0 = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|x64.Build.0 = Debug|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Debug|x86.Build.0 = Debug|Win32
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|Any CPU.Build.0 = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|ARM64.ActiveCfg = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|ARM64.Build.0 = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|x64.ActiveCfg = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|x64.Build.0 = Release|x64
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|x86.ActiveCfg = Release|Win32
|
||||
{42AACC62-A37C-4B33-A687-D13C472CC980}.Release|x86.Build.0 = Release|Win32
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4999B360-F561-4B6D-A7B0-82EECE329089}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|ARM64.ActiveCfg = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|ARM64.Build.0 = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|x64.Build.0 = Debug|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Debug|x86.Build.0 = Debug|Win32
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|Any CPU.Build.0 = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|ARM64.ActiveCfg = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|ARM64.Build.0 = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|x64.ActiveCfg = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|x64.Build.0 = Release|x64
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|x86.ActiveCfg = Release|Win32
|
||||
{6E425E69-15FA-474A-8798-054F0E0005E1}.Release|x86.Build.0 = Release|Win32
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|ARM64.ActiveCfg = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|ARM64.Build.0 = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|x64.Build.0 = Debug|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Debug|x86.Build.0 = Debug|Win32
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|Any CPU.Build.0 = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|ARM64.ActiveCfg = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|ARM64.Build.0 = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|x64.ActiveCfg = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|x64.Build.0 = Release|x64
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|x86.ActiveCfg = Release|Win32
|
||||
{7CCA5020-1E98-4AEF-99A4-34C05592CFE1}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F2DF1495-C7F9-4EBF-8EDA-C16C5812616A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,18 +0,0 @@
|
|||
#include "pch.h"
|
||||
#include "CppUnitTest.h"
|
||||
#include "../NetTunnelSDK/tunnel.h"
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
namespace UTNetTunnelSDK {
|
||||
TEST_CLASS(UTNetTunnelSDK) {
|
||||
public:
|
||||
TEST_METHOD(TestTestMessage) {
|
||||
Assert::AreEqual("Test Message", TestMessage());
|
||||
}
|
||||
|
||||
TEST_METHOD(TestTunnelSDKInitEnv) {
|
||||
Assert::AreEqual(0, TunnelSDKInitEnv());
|
||||
}
|
||||
};
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" 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>17.0</VCProjectVersion>
|
||||
<ProjectGuid>{6E425E69-15FA-474A-8798-054F0E0005E1}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>UTNetTunnelSDK</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectSubType>NativeUnitTestProject</ProjectSubType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UseFullPaths>true</UseFullPaths>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UseFullPaths>true</UseFullPaths>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UseFullPaths>true</UseFullPaths>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UseFullPaths>true</UseFullPaths>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UTNetTunnelSDK.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NetTunnelSDK\NetTunnelSDK.vcxproj">
|
||||
<Project>{42aacc62-a37c-4b33-a687-d13c472cc980}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="UTNetTunnelSDK.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
|
@ -1,5 +0,0 @@
|
|||
// pch.cpp: 与预编译标头对应的源文件
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
|
|
@ -1,12 +0,0 @@
|
|||
// pch.h: 这是预编译标头文件。
|
||||
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
|
||||
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
|
||||
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
|
||||
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// 添加要在此处预编译的标头
|
||||
|
||||
#endif //PCH_H
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33801.468
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetTunnelSDK", "NetTunnelSDK\NetTunnelSDK.vcxproj", "{1584BAD4-DBEC-43D2-BC06-08C23F02489A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetTunnelApp", "NetTunnelApp\NetTunnelApp.csproj", "{C0FB06AC-AE53-4161-9248-C09D63822F07}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A} = {1584BAD4-DBEC-43D2-BC06-08C23F02489A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|x64.Build.0 = Debug|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Debug|x86.Build.0 = Debug|Win32
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|Any CPU.Build.0 = Release|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|x64.ActiveCfg = Release|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|x64.Build.0 = Release|x64
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|x86.ActiveCfg = Release|Win32
|
||||
{1584BAD4-DBEC-43D2-BC06-08C23F02489A}.Release|x86.Build.0 = Release|Win32
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C0FB06AC-AE53-4161-9248-C09D63822F07}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3BF586B1-B5F0-4440-91FF-15DD312D8F50}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Reference in New Issue