求助!编译错误,找不到错误源
我有一个类,原来都是对的,后来用ado来做数据层,结果出错,但错误在comip.h中出现,找不到原始的错误源,
error C2227: “->QueryInterface”的左边必须指向类/结构/联合/泛型类型 d:\program files\vs2010\vc\include\comip.h 810
template<typename _InterfacePtr> HRESULT _QueryInterface(_InterfacePtr p) throw()
{
HRESULT hr;
// Can't QI NULL
//
if (p != NULL) {
// Query for this interface
//
Interface* pInterface;
hr = p->QueryInterface(GetIID(), reinterpret_cast<void**>(&pInterface)); //错误在这一句
// Save the interface without AddRef()ing.
//
Attach(SUCCEEDED(hr)? pInterface: NULL);
}
else {
operator=(static_cast<Interface*>(NULL));
hr = E_NOINTERFACE;
}
return hr;
}
我现在把数据处理都屏蔽了,还是不对。
我这个类include了其他几个类,他们编译都是成功的,只有它编译失败,那这个错误是不是一定是这个类出现的呢?还是也有可能是其他类引起的?
此外,其他的几个类里,也有连接到数据处理层的,会不会还是出错,但我现在把数据层代码都移除了,只有文件头了啊!
各位大侠帮助啊,卡了两天了!