C++ COM неоднозначность для "createinstance" из "ccomcoclass" и " stddispatchimpl"
Sorry somehow some text is missing in my previous question. Thanks for bearing with me. Here is complete question- Working on VS2013. I have created a classs- class ATL_NO_VTABLE CMyClass : public CComObjectRootEx <<CComMultiThreadModel>>, public CComCoClass<<CMyClass, CLSID_MyClass&>>, public IDispatchImpl<<IMyInterface3, IID_IMyInterface3, LIBID_myLib, 1, 0>>, public StdDispatchImpl<<CMyClass>>; In another cpp file I'm creating instance as follows- CMyClass::CreateInstance(_pMyClass); <b>Here I get error, saying: error C2385: ambiguous access of 'CreateInstance' could be the 'CreateInstance' in base 'ATL::CComCoClass<<CMyClass, CLSID_MyClass>>' or could be the 'CreateInstance' in base 'StdDispatchImpl<<CMyClass&>> I need all the base class to derive from for my development purpose. Kindly advice how to resolve the ambiguity. If I exclude last line from my class (i.e. public StdDispatchImpl <<CMyClass>>), Compiler will be very happy to compile it successfully. note: I need to use CreateInstance from StdDispatchImpl<<CMyClass&>> Thanks, Praveen
Что я уже пробовал:
гугл..
Мне нужен весь базовый класс, производный от него для моей цели разработки.
Пожалуйста, посоветуйте, как разрешить эту двусмысленность.
Примечание: мне нужно использовать "Метод createinstance" от 'StdDispatchImpl< & lt;CMyClass>>'
barneyman
CMyClass:: StdDispatchImpl< cmyclass>:: CreateInstance ?