diff --git a/EPDReader/EPDReader.cpp b/EPDReader/EPDReader.cpp new file mode 100644 index 0000000..be18883 --- /dev/null +++ b/EPDReader/EPDReader.cpp @@ -0,0 +1,110 @@ +// EPDReader.cpp : Defines the functions for the static library. +// + +#include "pch.h" + +#include "framework.h" +#include "EPDReader.h" +#pragma comment (lib, "Setupapi.lib") + +#include +#include +#include +#include + + int ExecuteTest(LPCTSTR DriverName) + { + HDEVINFO hDevInfo; + int numberFound_ = 1; + LPCTSTR g_deviceDesc = _T("USB Composite Device"); + LPCTSTR thrmo = _T("USB\\VID_0EBB&PID_0340&MI_00"); + TCHAR tempString[512] = { 0 }; + + hDevInfo = SetupDiGetClassDevs(&GUID_DEVCLASS_USB, // ignored if DIGCF_ALLCLASSES set + NULL, // all devices + NULL, // optional + DIGCF_PRESENT); + + if (!hDevInfo) + { + return FALSE; + } + else + { + SP_DEVINFO_DATA deviceInfoData; + int i = 0; + deviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + DWORD devIndex; + + for (devIndex = 0; SetupDiEnumDeviceInfo(hDevInfo, devIndex, &deviceInfoData); ++devIndex) + { + // for each device + DWORD junk; + + bool found = false; + + if (SetupDiGetDeviceRegistryProperty(hDevInfo, &deviceInfoData, SPDRP_DEVICEDESC, &junk, (PBYTE)tempString, sizeof(tempString), NULL)) + { + OutputDebugStringW(tempString); + OutputDebugStringW(L"\n" ); + + if (_tcsicmp((LPCTSTR)tempString, g_deviceDesc) == 0) + { + // This is what we are looking for + // Add this line to find the registry key for this device and print it to the command line + memset(tempString, 0, 500); + SetupDiGetDeviceRegistryProperty(hDevInfo, &deviceInfoData, SPDRP_HARDWAREID, &junk, (PBYTE)tempString, sizeof(tempString), NULL); + + if (numberFound_ == 1) + { + OutputDebugStringW(L" -> "); + OutputDebugStringW(tempString); + OutputDebugStringW(L"\n"); + //This is the case we want where only one device is plugged in only do stuff with this device if it is the one that is plugged in + if (_tcsicmp((LPCTSTR)tempString, DriverName) == 0) + { + // this is the device that we want + } + else + { + continue; + } + } + + + SP_CLASSINSTALL_HEADER classInstallParams; + SP_PROPCHANGE_PARAMS propChangeParams; + + classInstallParams.cbSize = sizeof(SP_CLASSINSTALL_HEADER); + classInstallParams.InstallFunction = DIF_PROPERTYCHANGE; + + propChangeParams.ClassInstallHeader = classInstallParams; + + propChangeParams.StateChange = DICS_PROPCHANGE; + + propChangeParams.Scope = DICS_FLAG_GLOBAL; + propChangeParams.HwProfile = 0; + + // This sets the parameters that we want to change + SetupDiSetClassInstallParams(hDevInfo, + &deviceInfoData, + (PSP_CLASSINSTALL_HEADER)&propChangeParams, + sizeof(SP_PROPCHANGE_PARAMS)); + + // This call should change the state of the device + if (!SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, hDevInfo, &deviceInfoData)) + { + //we have not been able to change the setting so clean up and throw an error + SetupDiDestroyDeviceInfoList(hDevInfo); + throw(std::exception("Error enabling/disabling the device")); + } + } + } + } + + // Get rid of the handle + SetupDiDestroyDeviceInfoList(hDevInfo); + } + return TRUE; + } + diff --git a/EPDReader/EPDReader.h b/EPDReader/EPDReader.h new file mode 100644 index 0000000..2dfcb0c --- /dev/null +++ b/EPDReader/EPDReader.h @@ -0,0 +1,4 @@ +#pragma once +#include +#include +int ExecuteTest(LPCTSTR DriverName); \ No newline at end of file diff --git a/EPDReader/EPDReader.vcxproj b/EPDReader/EPDReader.vcxproj new file mode 100644 index 0000000..29a65e9 --- /dev/null +++ b/EPDReader/EPDReader.vcxproj @@ -0,0 +1,158 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {e3fec35e-e7c3-43ae-b1e7-a017bf642020} + EPDReader + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + true + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/EPDReader/EPDReader.vcxproj.filters b/EPDReader/EPDReader.vcxproj.filters new file mode 100644 index 0000000..fd4775a --- /dev/null +++ b/EPDReader/EPDReader.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {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 + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/EPDReader/framework.h b/EPDReader/framework.h new file mode 100644 index 0000000..880eb72 --- /dev/null +++ b/EPDReader/framework.h @@ -0,0 +1,3 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers diff --git a/EPDReader/pch.cpp b/EPDReader/pch.cpp new file mode 100644 index 0000000..91c22df --- /dev/null +++ b/EPDReader/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/EPDReader/pch.h b/EPDReader/pch.h new file mode 100644 index 0000000..04ff4c2 --- /dev/null +++ b/EPDReader/pch.h @@ -0,0 +1,13 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here +#include "framework.h" + +#endif //PCH_H diff --git a/StaticLib1/StaticLib1.cpp b/StaticLib1/StaticLib1.cpp new file mode 100644 index 0000000..625e66d --- /dev/null +++ b/StaticLib1/StaticLib1.cpp @@ -0,0 +1,10 @@ +// StaticLib1.cpp : Defines the functions for the static library. +// + +#include "pch.h" +#include "framework.h" + +// TODO: This is an example of a library function +void fnStaticLib1() +{ +} diff --git a/StaticLib1/StaticLib1.vcxproj b/StaticLib1/StaticLib1.vcxproj new file mode 100644 index 0000000..0f374b5 --- /dev/null +++ b/StaticLib1/StaticLib1.vcxproj @@ -0,0 +1,157 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6d42d3e0-4bfd-4546-a89c-7e5844fb3c93} + StaticLib1 + 10.0 + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + Level3 + true + _DEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions) + true + Use + pch.h + + + + + true + true + true + + + + + + + + + Create + Create + Create + Create + + + + + + + \ No newline at end of file diff --git a/StaticLib1/StaticLib1.vcxproj.filters b/StaticLib1/StaticLib1.vcxproj.filters new file mode 100644 index 0000000..76165ce --- /dev/null +++ b/StaticLib1/StaticLib1.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {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 + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/StaticLib1/framework.h b/StaticLib1/framework.h new file mode 100644 index 0000000..880eb72 --- /dev/null +++ b/StaticLib1/framework.h @@ -0,0 +1,3 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers diff --git a/StaticLib1/pch.cpp b/StaticLib1/pch.cpp new file mode 100644 index 0000000..91c22df --- /dev/null +++ b/StaticLib1/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/StaticLib1/pch.h b/StaticLib1/pch.h new file mode 100644 index 0000000..04ff4c2 --- /dev/null +++ b/StaticLib1/pch.h @@ -0,0 +1,13 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here +#include "framework.h" + +#endif //PCH_H diff --git a/TestReader/TestReader.cpp b/TestReader/TestReader.cpp new file mode 100644 index 0000000..a97c768 --- /dev/null +++ b/TestReader/TestReader.cpp @@ -0,0 +1,22 @@ +// TestReader.cpp : This file contains the 'main' function. Program execution begins and ends there. +// + +#include +#include "../EPDReader/EPDReader.cpp" + +int main() +{ + ExecuteTest(L"xx"); + std::cout << "Hello World!\n"; +} + +// Run program: Ctrl + F5 or Debug > Start Without Debugging menu +// Debug program: F5 or Debug > Start Debugging menu + +// Tips for Getting Started: +// 1. Use the Solution Explorer window to add/manage files +// 2. Use the Team Explorer window to connect to source control +// 3. Use the Output window to see build output and other messages +// 4. Use the Error List window to view errors +// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project +// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file diff --git a/TestReader/TestReader.vcxproj b/TestReader/TestReader.vcxproj new file mode 100644 index 0000000..e694f1a --- /dev/null +++ b/TestReader/TestReader.vcxproj @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {de08194b-3a79-4875-8f32-b375c789ee60} + TestReader + 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 + $(CoreLibraryDependencies);%(AdditionalDependencies);EPDReader.lib + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + {e3fec35e-e7c3-43ae-b1e7-a017bf642020} + + + + + + \ No newline at end of file diff --git a/TestReader/TestReader.vcxproj.filters b/TestReader/TestReader.vcxproj.filters new file mode 100644 index 0000000..066718f --- /dev/null +++ b/TestReader/TestReader.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 + + + + + Source Files + + + \ No newline at end of file diff --git a/TestUSBreader/TestUSBreader.vcxproj b/TestUSBreader/TestUSBreader.vcxproj new file mode 100644 index 0000000..614c930 --- /dev/null +++ b/TestUSBreader/TestUSBreader.vcxproj @@ -0,0 +1,85 @@ + + + + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + + {ae34dac7-9f61-460f-80c1-220009737411} + Linux + TestUSBreader + 15.0 + Linux + 1.0 + Generic + {D51BCBC9-82E9-4017-911E-C93873C4EA2B} + + + + true + + + false + + + true + + + false + + + true + + + false + + + false + + + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestUSBreader/main.cpp b/TestUSBreader/main.cpp new file mode 100644 index 0000000..baac199 --- /dev/null +++ b/TestUSBreader/main.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("hello from %s!\n", "TestUSBreader"); + return 0; +} \ No newline at end of file diff --git a/eDosStation.sln b/eDosStation.sln index b273e35..12a70bc 100644 --- a/eDosStation.sln +++ b/eDosStation.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31205.134 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EpdBase", "EpdBase\EpdBase.vcxproj", "{3114A047-7562-42FE-94DE-2418EF19AD9A}" EndProject @@ -39,6 +39,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testing", "Testing\Testing. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompareDef", "CompareDef\CompareDef.csproj", "{E8982C85-2107-4B5D-A9C1-FDB91B4F54FF}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EPDReader", "EPDReader\EPDReader.vcxproj", "{E3FEC35E-E7C3-43AE-B1E7-A017BF642020}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestReader", "TestReader\TestReader.vcxproj", "{DE08194B-3A79-4875-8F32-B375C789EE60}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -359,6 +363,46 @@ Global {E8982C85-2107-4B5D-A9C1-FDB91B4F54FF}.Release|x64.Build.0 = Release|Any CPU {E8982C85-2107-4B5D-A9C1-FDB91B4F54FF}.Release|x86.ActiveCfg = Release|Any CPU {E8982C85-2107-4B5D-A9C1-FDB91B4F54FF}.Release|x86.Build.0 = Release|Any CPU + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|Any CPU.Build.0 = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|ARM.ActiveCfg = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|ARM.Build.0 = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|ARM64.ActiveCfg = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|ARM64.Build.0 = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|x64.ActiveCfg = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|x64.Build.0 = Debug|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|x86.ActiveCfg = Debug|Win32 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Debug|x86.Build.0 = Debug|Win32 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|Any CPU.ActiveCfg = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|Any CPU.Build.0 = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|ARM.ActiveCfg = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|ARM.Build.0 = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|ARM64.ActiveCfg = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|ARM64.Build.0 = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|x64.ActiveCfg = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|x64.Build.0 = Release|x64 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|x86.ActiveCfg = Release|Win32 + {E3FEC35E-E7C3-43AE-B1E7-A017BF642020}.Release|x86.Build.0 = Release|Win32 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|Any CPU.ActiveCfg = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|Any CPU.Build.0 = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|ARM.ActiveCfg = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|ARM.Build.0 = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|ARM64.ActiveCfg = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|ARM64.Build.0 = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|x64.ActiveCfg = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|x64.Build.0 = Debug|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|x86.ActiveCfg = Debug|Win32 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Debug|x86.Build.0 = Debug|Win32 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|Any CPU.ActiveCfg = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|Any CPU.Build.0 = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|ARM.ActiveCfg = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|ARM.Build.0 = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|ARM64.ActiveCfg = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|ARM64.Build.0 = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|x64.ActiveCfg = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|x64.Build.0 = Release|x64 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|x86.ActiveCfg = Release|Win32 + {DE08194B-3A79-4875-8F32-B375C789EE60}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/eDosStation/App.config b/eDosStation/App.config index e0590ac..f0c4d25 100644 --- a/eDosStation/App.config +++ b/eDosStation/App.config @@ -6,8 +6,11 @@ - - + + diff --git a/eDosStation/Properties/Settings.Designer.cs b/eDosStation/Properties/Settings.Designer.cs index 5f81703..c5533e1 100644 --- a/eDosStation/Properties/Settings.Designer.cs +++ b/eDosStation/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace eDosStation.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/eDosStation/Properties/Settings.settings b/eDosStation/Properties/Settings.settings index fb189e4..f56c1e2 100644 --- a/eDosStation/Properties/Settings.settings +++ b/eDosStation/Properties/Settings.settings @@ -25,7 +25,7 @@ <?xml version="1.0" encoding="utf-16"?> -<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ConnectionString>Data Source=eDosLocal;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation</ConnectionString> <ProviderName>System.Data.SqlClient</ProviderName> </SerializableConnectionString> diff --git a/readme/images/ArchOptions.gif b/readme/images/ArchOptions.gif new file mode 100644 index 0000000..1ac4891 Binary files /dev/null and b/readme/images/ArchOptions.gif differ diff --git a/readme/images/ChangeRemote.gif b/readme/images/ChangeRemote.gif new file mode 100644 index 0000000..0de4274 Binary files /dev/null and b/readme/images/ChangeRemote.gif differ diff --git a/readme/images/ManageConnections.gif b/readme/images/ManageConnections.gif new file mode 100644 index 0000000..be6ee98 Binary files /dev/null and b/readme/images/ManageConnections.gif differ diff --git a/readme/images/OutputTypes.gif b/readme/images/OutputTypes.gif new file mode 100644 index 0000000..41ccb08 Binary files /dev/null and b/readme/images/OutputTypes.gif differ diff --git a/readme/images/debuggerexport.png b/readme/images/debuggerexport.png new file mode 100644 index 0000000..6579d86 Binary files /dev/null and b/readme/images/debuggerexport.png differ diff --git a/readme/images/firstconnection.png b/readme/images/firstconnection.png new file mode 100644 index 0000000..71c3591 Binary files /dev/null and b/readme/images/firstconnection.png differ diff --git a/readme/images/linker.png b/readme/images/linker.png new file mode 100644 index 0000000..ec67688 Binary files /dev/null and b/readme/images/linker.png differ diff --git a/readme/images/postbuild.png b/readme/images/postbuild.png new file mode 100644 index 0000000..09a6a77 Binary files /dev/null and b/readme/images/postbuild.png differ diff --git a/readme/readme.html b/readme/readme.html new file mode 100644 index 0000000..8e3c20e --- /dev/null +++ b/readme/readme.html @@ -0,0 +1,77 @@ + + + + + + + + Getting Started + + + + +
+ + + + +
+ +
+ + + +
+
+

Setting up your project for Linux Development

+ +

With this workload you can author C++ code for Linux servers, desktops and devices. You can manage your connections to these machines from within VS. VS will automatically copy and remotely build your sources and can launch your application with the debugger. Our project system supports targeting specific architectures, including ARM.

+ + +

Connecting to Linux

+

Prerequisites

+

Today we only support building remotely on the Linux target machine. We are not limited by specific Linux distros but we do have dependencies on the presence of some tools. Specifically, we need openssh-server, g++, gdb and gdbserver. Use your favorite package manager to install them, e.g. on Debian based systems: sudo apt-get install openssh-server g++ gdb gdbserver

+ +

First connection

+

The first time you target a Linux machine you will be prompted for connection information. This is triggered by building the project.

+ + +

Adding and removing connections

+

To add a new connection, go to Tools > Options and search for Connection, Connection Manager will be under Cross Platform. From here you can add and remove connections.

+ + +

To change which connection a project is using go to the project properties general settings and update the Remote Build Machine option.

+ + +

Project Properties

+

All of the options necessary to control C++ compilation are exposed on the project properies pages. We'll cover a few specific to how things work for Linux. First under general settings, you will see the remote root is set to ~/projects/ by default and that we are setting the remote project directory to match our project name in that location.

+ + +

Looking at the General settings for the project, you can see how our output and intermediate directories were configured. Additionally, you’ll see that this project was configured as an application – thus our executable is under bin/x64/Debug/ as ConsoleApplication1.out. Notice that for configuration types we also support static and dynamic libraries.

+ +

Add additional library dependencies on the Linker > Input property page.

+ + +

You can pass additional pre launch commands to the debugger to do things like launch graphical apps on the remote linux machine.

+ + +

You can also send post build events to control remote behavior, as in this example that exports a gpio pin for use without requiring the executable run as super user.

+ + +
+
+
+ +

Resources

+ +

Check out the VC++ for Linux Development page where we will keep updates posted and provider more in depth details on usage.

+

Give us feedback

+

Use the send feedback function in Visual Studio or contact us through Developer Community

+
+
+
+ + diff --git a/readme/stylesheet.css b/readme/stylesheet.css new file mode 100644 index 0000000..1a1c1cd --- /dev/null +++ b/readme/stylesheet.css @@ -0,0 +1,119 @@ +body { + margin: 0; + padding: 0; + border: 0; + color: #1E1E1E; + font-size: 13px; + font-family: "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1.45; + word-wrap: break-word; +} + +/* General & 'Reset' Stuff */ + + +.container { + width: 1100px; + margin: 0 auto; +} + +section { + display: block; + margin: 0; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; +} + +table, tr { + width: 1100px; + padding: 0px; + vertical-align: top; + } + +/* Header,
+ header - container + h1 - project name + h2 - project description +*/ + +#header { + color: #FFF; + background: #68217a; + position:relative; +} +h1, h2 { + font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1; + margin: 0 18px;; + padding: 0; +} +#header h1 { + font-size: 3.4em; + padding-top: 18px; + font-weight: normal; + margin-left: 15px; +} + +#header h2 { + font-size: 1.5em; + margin-top: 10px; + padding-bottom: 18px; + font-weight: normal; +} + +#main_content { + width: 100%; + display: flex; + flex-direction: row; +} + + +h1, h2, h3, h4, h5, h6 { + font-weight: bolder; +} + +#main_content h1 { + font-size: 1.8em; + margin-top: 34px; +} + + #main_content h1:first-child { + margin-top: 30px; + } + +#main_content h2 { + font-size: 1.8em; +} +p, ul { + margin: 11px 18px; +} + +#main_content a { + color: #06C; + text-decoration: none; +} +ul { + margin-top: 13px; + margin-left: 18px; + padding-left: 0; +} + ul li { + margin-left: 18px; + padding-left: 0; + } +#lpanel { + width: 870px; + float: left; +} +#rpanel ul { + list-style-type: none; +} + #rpanel ul li { + line-height: 1.8em; + } +#rpanel { + background: #e7e7e7; + width: 230px; +}