描述:
看错误都是由于下面的宏引起的(向导生成):
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_RCInfoAccess, CRCInfoAccess)
OBJECT_ENTRY(CLSID_DBAccess, CDBAccess)
OBJECT_ENTRY(CLSID_Test, CTest)
END_OBJECT_MAP()
错误大致如下:
E:\ReconInit\ReconInit.cpp(42) : error C2653: 'CDBAccess' : is not a class or namespace name
E:\ReconInit\ReconInit.cpp(42) : error C2065: 'UpdateRegistry' : undeclared identifier
E:\ReconInit\ReconInit.cpp(42) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(int)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\ReconInit\ReconInit.cpp(42) : error C2653: 'CDBAccess' : is not a class or namespace name
E:\ReconInit\ReconInit.cpp(42) : error C2065: 'CreateInstance' : undeclared identifier
E:\ReconInit\ReconInit.cpp(42) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(int)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\ReconInit\ReconInit.cpp(42) : error C2653: 'CDBAccess' : is not a class or namespace name
E:\ReconInit\ReconInit.cpp(42) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(int)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\ReconInit\ReconInit.cpp(42) : error C2653: 'CDBAccess' : is not a class or namespace name
E:\ReconInit\ReconInit.cpp(42) : error C2065: 'GetObjectDescription' : undeclared identifier
E:\ReconInit\ReconInit.cpp(42) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(void *,const struct _GUID &,void ** )'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\ReconInit\ReconInit.cpp(42) : error C2653: 'CDBAccess' : is not a class or namespace name
。。。。。。。。。。。。
解决方案1:
你的VC6有问题!建议重装,我以前也碰到过!哈哈