visual-c++-2015

Why does FormatMessage only create partial messages for ERROR_SYSTEM_PROCESS_TERMINATED and ERROR_UNHANDLED_EXCEPTION system errors?

情到浓时终转凉″ 提交于 2019-12-03 22:28:31
I have been using the FormatMessage function within the Windows API to generate message strings from system error codes. I noticed that for some error codes the full message doesn't appear to be created. Take this sample program as an example: int main() { wchar_t * buffer = nullptr; FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, ERROR_SYSTEM_PROCESS_TERMINATED, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<LPWSTR>(&buffer), 0, nullptr); std::wcout << buffer << std::endl; return 0; } According to MSDN I should

Lambda is deduced to std::function if template has no variadic arguments

泄露秘密 提交于 2019-12-03 16:47:50
问题 template<typename ReturnT, typename... ParamT> void foo(std::function<ReturnT(ParamT...)> callback) {} template<typename ReturnT, typename ParamT> void bar(std::function<ReturnT(ParamT)> callback) {} main() { foo<int, int>([](int x){ return x; }); // no instance of function // template matches argument list bar<int, int>([](int x){ return x; }); // OK } The only difference between foo and bar is that foo has variadic arguments. Somehow the compiler is able to convert the lambda to a std:

Binary compatibility between VS2017 and VS2015

徘徊边缘 提交于 2019-12-02 02:12:49
This SO post: Is Visual-C++-2017 binary compatible with VC++-2015? clearly says that VS 2017 is binary compatible with VS 2015. It even looks like the official position. My question is, in the past, I distinctly remember running into linker errors (I do not recall the specific set of errors) every time I try to link in a static library that was compiled with a different version of MSVC into an EXE that is being built with a newer version of MSVC. Yet, binary (in)compatibility sounds like something that will blow up in your face at runtime , not link time. Can someone tell me if previous

Is Visual-C++-2017 binary compatible with VC++-2015?

落花浮王杯 提交于 2019-11-30 08:54:22
问题 Steve tells me that VC 2015 and VC 2017 are actually (gonna be) binary compatible . I found zero info wrt. this in the release notes for 2017 (RC) - or pretty much anywhere for that matter, so here goes: Is a C++ (C++ interface) DLL built with VC++-2017 binary compatible with a DLL built by VC++-2015? Do 2017 and 2015 use the same (dynamic) runtime library? If so, what, if any, is the runtime difference between Platform Toolset Visual Studio 2017 (v141) and Visual Studio 2015 (v140) ? (*) (*)

Is Visual-C++-2017 binary compatible with VC++-2015?

拥有回忆 提交于 2019-11-29 09:06:56
Steve tells me that VC 2015 and VC 2017 are actually (gonna be) binary compatible . I found zero info wrt. this in the release notes for 2017 (RC) - or pretty much anywhere for that matter, so here goes: Is a C++ (C++ interface) DLL built with VC++-2017 binary compatible with a DLL built by VC++-2015? Do 2017 and 2015 use the same (dynamic) runtime library ? If so, what, if any, is the runtime difference between Platform Toolset Visual Studio 2017 (v141) and Visual Studio 2015 (v140) ? (*) (*): Yeah, I actually went ahead and installed the 2017 RC, and from what I can see on the surface, at

How to detect if Visual C++ 2017 Redistributable is installed

穿精又带淫゛_ 提交于 2019-11-28 00:03:18
With Microsoft changing the pattern of registry entries in its latest versions, how do i detect if Visual C++ 2017 Redistributable is installed on a machine? My aim is to install VC++2015Redist since the software is written using VS2015. If i can successfully detect VC++2017Redist on a machine, then I skip my installation of VC++2015Redist The 2017 VC++ Redistributable installation upgrades/REPLACES the 2015 installation Installation of the Visual Studio 2017 Redistributables upgrades and replaces any existing installation of the 2015 Redistributables. I've checked this, and the 2015