diff --git a/.gitignore b/.gitignore index d63ff7e..2634447 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,10 @@ msg_gen srv_gen doc/html *sublime-workspace +*.user +*.suo +*.sdf +*.opensdf +ipch +Debug +Release diff --git a/src/impl/win.cc b/src/impl/win.cc index d933fe9..c25bf4f 100644 --- a/src/impl/win.cc +++ b/src/impl/win.cc @@ -317,7 +317,7 @@ Serial::SerialImpl::read (uint8_t *buf, size_t size) throw PortNotOpenedException ("Serial::read"); } DWORD bytes_read; - if (!ReadFile(fd_, buf, size, &bytes_read, NULL)) { + if (!ReadFile(fd_, buf, static_cast(size), &bytes_read, NULL)) { stringstream ss; ss << "Error while reading from the serial port: " << GetLastError(); THROW (IOException, ss.str().c_str()); @@ -332,7 +332,7 @@ Serial::SerialImpl::write (const uint8_t *data, size_t length) throw PortNotOpenedException ("Serial::write"); } DWORD bytes_written; - if (!WriteFile(fd_, data, length, &bytes_written, NULL)) { + if (!WriteFile(fd_, data, static_cast(length), &bytes_written, NULL)) { stringstream ss; ss << "Error while writing to the serial port: " << GetLastError(); THROW (IOException, ss.str().c_str()); diff --git a/visual_studio/serial/serial.vcxproj b/visual_studio/serial/serial.vcxproj index 0465ba7..3bef985 100644 --- a/visual_studio/serial/serial.vcxproj +++ b/visual_studio/serial/serial.vcxproj @@ -5,23 +5,46 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD} serial + + v120_xp + v110_xp + StaticLibrary true MultiByte + + StaticLibrary + true + MultiByte + - Application + StaticLibrary + false + true + MultiByte + + + StaticLibrary false true MultiByte @@ -32,9 +55,15 @@ + + + + + + @@ -48,6 +77,21 @@ setupapi.lib;%(AdditionalDependencies) + Windows + + + + + Level3 + Disabled + ..\..\..\serial\include;%(AdditionalIncludeDirectories) + + + true + + + setupapi.lib;%(AdditionalDependencies) + Windows @@ -56,12 +100,35 @@ MaxSpeed true true + ..\..\..\serial\include;%(AdditionalIncludeDirectories) true true true + + setupapi.lib;%(AdditionalDependencies) + Windows + + + + + Level3 + MaxSpeed + true + true + ..\..\..\serial\include;%(AdditionalIncludeDirectories) + + + true + true + true + + + setupapi.lib;%(AdditionalDependencies) + Windows + diff --git a/visual_studio/test_serial/test_serial.vcxproj b/visual_studio/test_serial/test_serial.vcxproj index 7a817bc..293fbce 100644 --- a/visual_studio/test_serial/test_serial.vcxproj +++ b/visual_studio/test_serial/test_serial.vcxproj @@ -5,36 +5,65 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8} test_serial + + v120_xp + v110_xp + Application true MultiByte + + Application + true + MultiByte + Application false true MultiByte + + Application + false + true + MultiByte + + + + + + + @@ -45,6 +74,18 @@ true + Console + + + + + Level3 + Disabled + ..\..\..\serial\include + + + true + Console @@ -53,11 +94,28 @@ MaxSpeed true true + ..\..\..\serial\include true true true + Console + + + + + Level3 + MaxSpeed + true + true + ..\..\..\serial\include + + + true + true + true + Console diff --git a/visual_studio/visual_studio.sln b/visual_studio/visual_studio.sln index 7c9fb7a..d1b4a7a 100644 --- a/visual_studio/visual_studio.sln +++ b/visual_studio/visual_studio.sln @@ -8,17 +8,27 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Debug|Win32.ActiveCfg = Debug|Win32 {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Debug|Win32.Build.0 = Debug|Win32 + {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Debug|x64.ActiveCfg = Debug|x64 + {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Debug|x64.Build.0 = Debug|x64 {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Release|Win32.ActiveCfg = Release|Win32 {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Release|Win32.Build.0 = Release|Win32 + {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Release|x64.ActiveCfg = Release|x64 + {A8517FB2-C74E-43BD-B3C6-B05D3FC11ECD}.Release|x64.Build.0 = Release|x64 {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Debug|Win32.ActiveCfg = Debug|Win32 {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Debug|Win32.Build.0 = Debug|Win32 + {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Debug|x64.ActiveCfg = Debug|x64 + {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Debug|x64.Build.0 = Debug|x64 {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Release|Win32.ActiveCfg = Release|Win32 {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Release|Win32.Build.0 = Release|Win32 + {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Release|x64.ActiveCfg = Release|x64 + {92EE7E58-C737-41F9-B795-9B6ACF6AB0B8}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE