diff --git a/DroneClientCpp/DroneClientCpp.sln b/DroneClientCpp/DroneClientCpp.sln index d6ab8bc..fdaf6fd 100644 --- a/DroneClientCpp/DroneClientCpp.sln +++ b/DroneClientCpp/DroneClientCpp.sln @@ -1,10 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.12.35527.113 d17.12 +VisualStudioVersion = 17.12.35527.113 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DroneClientCpp", "DroneClientCpp.vcxproj", "{690C304C-A70B-4B0F-BF61-8C51290BF444}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestClientConnection", "..\TestClientConnection\TestClientConnection.vcxproj", "{B7CC5245-B628-40E9-A9A0-A904E2BF25EA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -21,6 +23,14 @@ Global {690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x64.Build.0 = Release|x64 {690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x86.ActiveCfg = Release|Win32 {690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x86.Build.0 = Release|Win32 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Debug|x64.ActiveCfg = Debug|x64 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Debug|x64.Build.0 = Debug|x64 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Debug|x86.ActiveCfg = Debug|Win32 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Debug|x86.Build.0 = Debug|Win32 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Release|x64.ActiveCfg = Release|x64 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Release|x64.Build.0 = Release|x64 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Release|x86.ActiveCfg = Release|Win32 + {B7CC5245-B628-40E9-A9A0-A904E2BF25EA}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DroneClientCpp/FormMain.h b/DroneClientCpp/FormMain.h index 0729ff1..ec63414 100644 Binary files a/DroneClientCpp/FormMain.h and b/DroneClientCpp/FormMain.h differ diff --git a/DroneClientCpp/FormMain.resx b/DroneClientCpp/FormMain.resx index 59099f2..27962ab 100644 --- a/DroneClientCpp/FormMain.resx +++ b/DroneClientCpp/FormMain.resx @@ -120,4 +120,7 @@ 17, 17 + + 310, 17 + \ No newline at end of file diff --git a/TestClientConnection/TestClientConnection.cpp b/TestClientConnection/TestClientConnection.cpp new file mode 100644 index 0000000..2401cf6 --- /dev/null +++ b/TestClientConnection/TestClientConnection.cpp @@ -0,0 +1,31 @@ +#include +#include +#include + +#pragma comment(lib, "Ws2_32.lib") + +int main() +{ + WSAData wsaData; + WORD DLLVersion = MAKEWORD(2, 1); + + if (WSAStartup(DLLVersion, &wsaData) != 0) + { + std::cout << "Error startup\n"; + exit(1); + } + + SOCKADDR_IN addr; + addr.sin_family = AF_INET; + addr.sin_port = htons(1001); + + // Use inet_pton instead of inet_addr + if (inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr) <= 0) + { + std::cout << "Error converting IP address\n"; + exit(1); + } + + system("pause"); + std::cout << "Hello World!\n"; +} diff --git a/TestClientConnection/TestClientConnection.vcxproj b/TestClientConnection/TestClientConnection.vcxproj new file mode 100644 index 0000000..89baf73 --- /dev/null +++ b/TestClientConnection/TestClientConnection.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {b7cc5245-b628-40e9-a9a0-a904e2bf25ea} + TestClientConnection + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/TestClientConnection/TestClientConnection.vcxproj.filters b/TestClientConnection/TestClientConnection.vcxproj.filters new file mode 100644 index 0000000..505cabd --- /dev/null +++ b/TestClientConnection/TestClientConnection.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file