VS2005 Security Update KB971090导致你的插件不能正确注册

来源:互联网 发布:如何找到网络打印机 编辑:程序博客网 时间:2024/04/28 22:25

最近我发现如果你安装了VS2005 Security Update KB971090(见下图),然后重新编译你的C++写的Inventor插件(或者其它C++写的dll程序),注册该插件将得到一个错误提示说你的程序配置有错误,无法注册你的插件,需要重新配置你的程序。

我测试了没有安装KB971090的情况下,插件注册成功。后来直到读了微软网站上的一些讨论,才知道这个KB971090悄无声息地把windows系统上一些VC库文件给改了,而VS2005用的是修改后的配置,甚至VS2008也有这个问题,但是VS2008还可以重新配置以便使用RTM版本的库文件,因此当你把试图把程序安装到一个没有装过VS2005(当然也就没有KB971090)的用户的机器上时,注册不能成功进行了。

总之,解决方法是卸载KB971090,或者强迫每个使用你的插件的人安装vcredist_x86.exe(该文件在C:/program files/microsoft visual studio 8/sdk/v2.0/bootstrapper/Packages/vcredist_x86文件夹里),然后你的插件才能恢复正常注册。

下面是引用自微软网站上的讨论:

"Just a heads up, the latest ATL security update distributed by Windows
update includes new merge modules/dlls/libraries for VS2005 at least. It
may also update other versions of visual studio.

Also, vcredist.exe for VC8 has also been updated, and now distributes
version 8.0.50727.4053 instead of 762.

Among the ATL changes is a change to dlgcore.cpp and barcore.cpp in the MFC
libraries I believe (again on VS2005). "

"and the security update causes huge problems for software vendors that want
to continue to target the 762 versions, due to header define
_CRT_ASSEMBLY_VERSION etc getting changed to a new version, thereby making
your apps depend on the new versions of the DLLs.

The only solution is to block this security update (KB971090) from being
deployed in your organization (either through WSUS or by hiding the update
through other means)

The same problem exists in Visual Studio 2008, but only if you define
_BIND_TO_CURRENT_VCLIBS_VERSION in your app. Unlike VC2005 SP1, by default
a VC2008 app targets the RTM versions of the DLLs and relies on the policy
redirects to pick up the new versions if you don't use the define I
mentioned. "

The offending KB that you probably have installed unknowingly via Windows
Update is KB971090. You will want to uninstall that via add/remove programs
(check the show updates check box) as soon as possible, to get rid of the
problem.

"If you don't want to uninstall, there's no known workaround other than
forcing everyone to install newer version of vcredist_x86.exe which is at:

C:/program files/microsoft visual studio
8/sdk/v2.0/bootstrapper/Packages/vcredist_x86

notice that your old vcredist_x86 (version 762) is gone, nowhere to be found
(it was overwritten by the security update)"

原创粉丝点击