VS 2008 atlcom.h ClassesAllowedInStream 未定义(无法转换参数) [英] VS 2008 atlcom.h ClassesAllowedInStream not defined (cannot convert parameter)

查看:17
本文介绍了VS 2008 atlcom.h ClassesAllowedInStream 未定义(无法转换参数)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆