As suggested in this post, If I install the VC++ redistributables for VS2015 update 3 am I likely to break other software running on the same PC built with previous updates to VS2015? Similarly, if I stick with update 2 for my release, is this going to get broken at some point in the future when someone installs the redists for update 3?
1 回答
根据New VC Runtime 14.0.24210.0中报告的错误描述,会破坏使用 VS 2015 Update 2 构建的 MFC 应用程序,U3 可再发行组件确实会破坏MFC
使用 U2 或更早版本编译的应用程序,其中:
- 在 DLL 中使用
MFC
,即非静态链接,并且 - 创建类型
CMFCToolBarButton
或派生的对象。
从链接页面:
该问题是由 CMFCToolBarButton 类中的新 BOOL 成员 m_bIsDragged 引起的。
因此,Update 2 和 3 之间的内存布局不同。
在构造函数中初始化 m_bIsDragged 时,ToolBarButton 后面的(堆栈)内存被覆盖。从 CMFCToolBarButton 派生的所有类也应该出现问题:
CMFCColorMenuButton
CMFCCustomizeMenuButton
CMFCDropDownToolbarButton
CMFCOutlookBarPaneButton
CMFCRibbonGalleryMenuButton
CMFCToolBarComboBoxButton
CMFCToolBarDateTimeCtrl
CMFCToolBarEditBoxButton
CMFCToolBarFontComboBox
CMFCToolBarFontSizeComboBox
CMFCToolBarMenuButton
CMFCToolBarMenuButtonsButton
CMFCToolBarSpinEditBoxButton
CMFCToolBar
[编辑] 为了完整起见,应该指出,使用
MFC/CRT
DLL 的 AppLocal 部署的应用程序不受影响,因为它们不使用系统范围内安装的副本。
AppLocal 部署在通用 CRT简介中的“使用通用 CRT 的分发软件”中的第 6 条“更新于 2015 年 9 月 11 日”中进行了描述。