当我使用客户提供的 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
最佳答案
通过对我的 Crystal 球进行大量猜测,我将假设 CmdParser 是您尝试创建的新 ATL COM 类。如果是这种情况,我相信 VS ATL 向导中存在一个错误,导致 WINCE ATL 项目无效。我为此使用的一个简单的解决方法是注释掉以下内容:
//#ifndef _CE_DCOM
DECLARE_REGISTRY_RESOURCEID(IDR_TESTATLOBJ)
//#endif
您的 ATL 类的头文件中应该有类似的代码。
this post中有一些关于这个问题的评论.
关于c++ - UpdateRegistry编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6137989/