UpdateRegistry编译错误

问题描述

| 使用客户提供的WInCE设备SDK构建ATL com时,出现以下错误。我该如何解决这个问题?我用VS-2005创建了工作区。
1>f:\\polycold\\testapps\\polycoldsmartdevice\\polycoldsmartdevice\\CmdParser.h(73) : error C2039: \'UpdateRegistry\' : is not a member of \'CCmdParser\'
1>        f:\\polycold\\testapps\\polycoldsmartdevice\\polycoldsmartdevice\\CmdParser.h(29) : see declaration of \'CCmdParser\'
1>f:\\polycold\\testapps\\polycoldsmartdevice\\polycoldsmartdevice\\CmdParser.h(73) : error C2065: \'UpdateRegistry\' : undeclared identifier
    

解决方法

通过对我的水晶球进行大量猜测,我将假定CmdParser是您要创建的新ATL COM类。如果真是这样,我相信VS ATL向导中存在一个错误,该错误使WINCE ATL项目无效。我为此使用的一种简单的解决方法是注释掉以下内容:
//#ifndef _CE_DCOM
DECLARE_REGISTRY_RESOURCEID(IDR_TESTATLOBJ)
//#endif
您的ATL类的头文件上应该有类似的代码。 这篇文章对此有一些评论。     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...