LastError is set to 0 in VS2015


  • VS2015 introduced breaking changes regarding the "last error" behavior.

    e.g in Debug builds, every memory allocation (malloc, new, ...) resets the last error.

    This in itself is bad enough.

    But also in Release builds this happens. set_locale e.g. resets the last error. This is especially a problem if these calls happen implicitly (e.g during an strcmp).

    These breaking changes have been introduced with the advent of the "Universal CRT". Any plans on fixing this?

    Monday, July 25, 2016 3:15 PM

All replies

  • For clearer understanding, maybe you should show some typical cases when setting the last error, in a new manner that contradicts the previous documentation, produces issues that are difficult to solve.

    • Edited by Viorel_MVP Monday, July 25, 2016 4:58 PM
    Monday, July 25, 2016 4:58 PM
  • Hi z1c0,

    As Viorel said, please provide us some more infomation about your problem.  To better troubleshoot your issue, please shared us a simple or the steps to reproduce your issue.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    Monday, August 1, 2016 8:49 AM