VS 2008 atlcom.h ClassesAllowedInStream 未定义(无法转换参数) [英] VS 2008 atlcom.h ClassesAllowedInStream not defined (cannot convert parameter)
问题描述
我正在尝试在 VC++2008 中构建一个项目,但出现以下错误:
I am trying to build a project in VC++2008 and it is giving the following error:
error C2664: 'HRESULT ATL::CComVariant::ReadFromStream
(IStream *,VARTYPE,ATL::ClassesAllowedInStream,DWORD)' :
cannot convert parameter 3 from 'const int' to 'ATL::ClassesAllowedInStream'
c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlcom.h
6054
有人可以帮忙吗?
推荐答案
这是由 VS2008 Service Pack 1 安装中的错误引起的错误.我遇到了同样的问题.
This is an error that stems from a bug in the VS2008 Service Pack 1 installation. I had the same problem.
我的解决方法是重新安装 VS 2008(设置选项修复/全新安装"),然后立即安装 SP1.
A workaround for me was to reinstall VS 2008 (setup option "repair/clean new install") and then immediately install SP1.
如果在安装 VS2008 和 SP1 之间安装了 Windows SDK,则会出现此错误.在这种情况下,VS2008 SP1 安装更新文件 atlcom.h
,但未能相应地更新其包含的文件 atlcomcli.h
,因此 ClassesAllowedInStream
未定义.
The bug occurs if a Windows SDK is installed between the installation of VS2008 and SP1. In this case, the VS2008 SP1 installation updates the file atlcom.h
, but fails to update its included file atlcomcli.h
accordingly, thus ClassesAllowedInStream
is undefined.
查看讨论 在 MSDN Social 和 在此邮件列表中.
这篇关于VS 2008 atlcom.h ClassesAllowedInStream 未定义(无法转换参数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!