在VS下调试出现4个错误:错误 1 error C2259: “ATL::CComObject<Base>”: 不能实例化抽象类 c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlcom.h错误 2 error C2660: 函数不接受 0 个参数错误 3 error C2660: 函数不接受 0 个参数错误 4 error C2227: “->Count”的左边必须指向类/结构/联合/泛型类型最好转为VS的,谢谢
源码地址:http://download.csdn.net/detail/aisniper/4347688
源码地址:http://download.csdn.net/detail/aisniper/4347688
D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(2440) : error C2259: 'CComObject<class CCimPickToolImpl>' : cannot instantiate abstract class due to following members:
//
CimPickTool.dll - 5 error(s), 26 warning(s)
感谢大哥的帮助,代码编译通过了。但实际应用这个DLL时有问题。
会在这里出现死循环。请问是什么原因引起的
while (1)
{
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
///////////////////这里出现死循环//////////////////////////
{
if (msg.message == WM_QUIT) {
hr = S_FALSE;
goto __EXIT_POINT__;
} TranslateMessage(&msg);
DispatchMessage(&msg); if (pPickTool->m_CEvent.Lock(0) != 0)
{//Will be True when selection done or moise middle button pressed then m_CEvent made signaled
aToolCont->PopTool(pPickTool);//Deactivate PickTool
IsPoped = true;
break ;
}
}
if (IsPoped)
break ;
}
如果还不懂, 就只能推荐你去看 <<Programing Windows>> 编程书了.