P
PLS
I'm converting some C++ code to VC++ 2005 in native (non-managed) mode.
This code doesn't use ATL, but codes the COM mechanisms directly.
It has a class which is the equivalent of ATL's IDispatchImpl:
template<class T>
class CDispatch : virtual public IDispatch, virtual public CUnknown,
private CDispatchBase
{
...
CDispatch::CDispatch(IUnknown *pOuterUnknown)
: CUnknown(pOuterUnknown),
m_pITypeInfo(0)
{}
...
};
The constructor produces this error:
c:\project\pciw\cdisp.h(253) : error C2385: ambiguous access of '{ctor}'
could be the '{ctor}' in base 'IDispatch'
or could be the '{ctor}' in base 'CUnknown'
or could be the '{ctor}' in base 'CDispatchBase'
c:\project\pciw\cdisp.h(285) : see reference to class template
instantiation 'CDispatch<T>' being compiled
I understand about name collisions and disambiguation for methods in
multiple inheritance. How do you disambiguate a constructor?
Seriously, how do I fix this?
Thanks,
++PLS
This code doesn't use ATL, but codes the COM mechanisms directly.
It has a class which is the equivalent of ATL's IDispatchImpl:
template<class T>
class CDispatch : virtual public IDispatch, virtual public CUnknown,
private CDispatchBase
{
...
CDispatch::CDispatch(IUnknown *pOuterUnknown)
: CUnknown(pOuterUnknown),
m_pITypeInfo(0)
{}
...
};
The constructor produces this error:
c:\project\pciw\cdisp.h(253) : error C2385: ambiguous access of '{ctor}'
could be the '{ctor}' in base 'IDispatch'
or could be the '{ctor}' in base 'CUnknown'
or could be the '{ctor}' in base 'CDispatchBase'
c:\project\pciw\cdisp.h(285) : see reference to class template
instantiation 'CDispatch<T>' being compiled
I understand about name collisions and disambiguation for methods in
multiple inheritance. How do you disambiguate a constructor?
Seriously, how do I fix this?
Thanks,
++PLS