From 83b987587d68d71bba7f95ece4ca60723c4a5025 Mon Sep 17 00:00:00 2001 From: Pavel A Date: Fri, 16 Jan 2015 11:02:58 +0200 Subject: [PATCH] GUI demo: added vs2013 config, x64 --- .../vsproj/hidusb-relay-cmd(vc2013).vcxproj | 5 +- .../hidusb-relay-cmd(vc2013).vcxproj.filters | 12 +- windows-vs/VS_GUI_demo/AssemblyInfo.cpp | 6 +- windows-vs/VS_GUI_demo/GUIapp.cpp | 4 +- windows-vs/VS_GUI_demo/GUIapp.vcxproj | 204 ++++++++++++++++++ windows-vs/VS_GUI_demo/GUIapp.vcxproj.filters | 51 +++++ windows-vs/usbrelay(vc2013).sln | 35 +++ 7 files changed, 302 insertions(+), 15 deletions(-) create mode 100644 windows-vs/VS_GUI_demo/GUIapp.vcxproj create mode 100644 windows-vs/VS_GUI_demo/GUIapp.vcxproj.filters diff --git a/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj b/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj index 6d6f7b9..f29ed66 100644 --- a/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj +++ b/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj @@ -71,11 +71,8 @@ Release\ Release\ - true - - - true + Disabled diff --git a/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj.filters b/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj.filters index 8b1cb26..11110c6 100644 --- a/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj.filters +++ b/commandline/vsproj/hidusb-relay-cmd(vc2013).vcxproj.filters @@ -15,25 +15,25 @@ - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + \ No newline at end of file diff --git a/windows-vs/VS_GUI_demo/AssemblyInfo.cpp b/windows-vs/VS_GUI_demo/AssemblyInfo.cpp index 3e67f7c..4f3e5de 100644 --- a/windows-vs/VS_GUI_demo/AssemblyInfo.cpp +++ b/windows-vs/VS_GUI_demo/AssemblyInfo.cpp @@ -12,11 +12,11 @@ using namespace System::Security::Permissions; // associated with an assembly. // [assembly:AssemblyTitleAttribute("GUIapp")]; -[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyDescriptionAttribute("GUI demo for USB HID relay devices")]; [assembly:AssemblyConfigurationAttribute("")]; [assembly:AssemblyCompanyAttribute("")]; [assembly:AssemblyProductAttribute("GUIapp")]; -[assembly:AssemblyCopyrightAttribute("Copyright (c) 2015")]; +[assembly:AssemblyCopyrightAttribute("Copyright (c) 2014")]; [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; @@ -37,4 +37,4 @@ using namespace System::Security::Permissions; [assembly:CLSCompliantAttribute(true)]; -[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; +//[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; diff --git a/windows-vs/VS_GUI_demo/GUIapp.cpp b/windows-vs/VS_GUI_demo/GUIapp.cpp index 43ffe3e..1497ed6 100644 --- a/windows-vs/VS_GUI_demo/GUIapp.cpp +++ b/windows-vs/VS_GUI_demo/GUIapp.cpp @@ -25,7 +25,7 @@ int main(array ^args) // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); - Application::SetCompatibleTextRenderingDefault(false); + Application::SetCompatibleTextRenderingDefault(false); // Create the main window and run it Application::Run(gcnew Form1()); @@ -77,7 +77,7 @@ System::Void Form1::buttonOpen_Click(System::Object^ sender, System::EventArgs^ buttonClose_Click(sender, e); } - intptr_t dh = usb_relay_device_open_with_serial_number(id, strlen(id)); + intptr_t dh = usb_relay_device_open_with_serial_number(id, (int)strlen(id)); if ( dh ) { g_dev = dh; IndOpen->BackColor = Drawing::Color::LimeGreen; diff --git a/windows-vs/VS_GUI_demo/GUIapp.vcxproj b/windows-vs/VS_GUI_demo/GUIapp.vcxproj new file mode 100644 index 0000000..f98e3fc --- /dev/null +++ b/windows-vs/VS_GUI_demo/GUIapp.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8} + GUIapp + ManagedCProj + + + + Application + v120 + Unicode + Pure + true + + + Application + v120 + Unicode + Pure + true + + + Application + v120 + Unicode + Pure + + + Application + v120 + Unicode + Pure + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>12.0.30501.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + false + + + + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + + $(OutDir);%(AdditionalLibraryDirectories) + true + true + Windows + main + MachineX86 + + + + + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + + + $(OutDir);%(AdditionalLibraryDirectories) + true + true + Windows + main + + + + + WIN32;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + + + + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + main + MachineX86 + + + + + WIN32;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + + + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + main + + + + + true + true + + + true + true + + + true + true + + + + + + + + + CppForm + + + + + + + + + + + + + + + Form1.h + Designer + + + + + + \ No newline at end of file diff --git a/windows-vs/VS_GUI_demo/GUIapp.vcxproj.filters b/windows-vs/VS_GUI_demo/GUIapp.vcxproj.filters new file mode 100644 index 0000000..ff5bc55 --- /dev/null +++ b/windows-vs/VS_GUI_demo/GUIapp.vcxproj.filters @@ -0,0 +1,51 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + + + Resource Files + + + + + Resource Files + + + + + + + + Resource Files + + + \ No newline at end of file diff --git a/windows-vs/usbrelay(vc2013).sln b/windows-vs/usbrelay(vc2013).sln index 3f3c0ff..07972cf 100644 --- a/windows-vs/usbrelay(vc2013).sln +++ b/windows-vs/usbrelay(vc2013).sln @@ -5,22 +5,57 @@ VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hidusb-relay-cmd", "..\commandline\vsproj\hidusb-relay-cmd(vc2013).vcxproj", "{CF9B07CB-509D-43B5-94FC-2BA43427C093}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usb-relay-dll", "..\lib\usb-relay-dll\usb-relay-dll(vc2013).vcxproj", "{0E07152A-666D-4EB4-9049-BDE08C35A86D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIapp", "VS_GUI_demo\GUIapp.vcxproj", "{59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}" + ProjectSection(ProjectDependencies) = postProject + {0E07152A-666D-4EB4-9049-BDE08C35A86D} = {0E07152A-666D-4EB4-9049-BDE08C35A86D} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release|Mixed Platforms = Release|Mixed Platforms Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|Win32.ActiveCfg = Debug|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|Win32.Build.0 = Debug|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|x64.ActiveCfg = Debug|x64 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Debug|x64.Build.0 = Debug|x64 + {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|Mixed Platforms.Build.0 = Release|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|Win32.ActiveCfg = Release|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|Win32.Build.0 = Release|Win32 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|x64.ActiveCfg = Release|x64 {CF9B07CB-509D-43B5-94FC-2BA43427C093}.Release|x64.Build.0 = Release|x64 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|Win32.Build.0 = Debug|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|x64.ActiveCfg = Debug|x64 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Debug|x64.Build.0 = Debug|x64 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|Mixed Platforms.Build.0 = Release|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|Win32.ActiveCfg = Release|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|Win32.Build.0 = Release|Win32 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|x64.ActiveCfg = Release|x64 + {0E07152A-666D-4EB4-9049-BDE08C35A86D}.Release|x64.Build.0 = Release|x64 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Debug|Win32.Build.0 = Debug|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Debug|x64.ActiveCfg = Debug|x64 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Release|Mixed Platforms.Build.0 = Release|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Release|Win32.ActiveCfg = Release|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Release|Win32.Build.0 = Release|Win32 + {59CCF7A0-C46F-4699-9A55-3A7DFA3333D8}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- 2.25.1