Interface inheritance... 
Author Message
 Interface inheritance...

I'm trying to implement interface inheritance and I've a problem. I'm
getting a compilation error in the BEGIN_COM_MAP section.

Here is my code:

BEGIN_COM_MAP(CTigerXTestLib)
        COM_INTERFACE_ENTRY(ITigerXTestLib)
        COM_INTERFACE_ENTRY(IBaseTigerTestLib)
        COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

and the error is 'static_cast' : cannot convert from 'class
CTigerXTestLib *' to 'struct ITigerXTestLib *'

I never had this problem before. Is it an inheritance issue?



Tue, 01 Mar 2005 22:57:52 GMT  
 Interface inheritance...
Did you derive from ITigerXTestLib?

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> I'm trying to implement interface inheritance and I've a problem. I'm
> getting a compilation error in the BEGIN_COM_MAP section.

> Here is my code:

> BEGIN_COM_MAP(CTigerXTestLib)
> COM_INTERFACE_ENTRY(ITigerXTestLib)
>         COM_INTERFACE_ENTRY(IBaseTigerTestLib)
> COM_INTERFACE_ENTRY(IDispatch)
> END_COM_MAP()

> and the error is 'static_cast' : cannot convert from 'class
> CTigerXTestLib *' to 'struct ITigerXTestLib *'

> I never had this problem before. Is it an inheritance issue?



Wed, 02 Mar 2005 01:53:41 GMT  
 Interface inheritance...
No... From BaseTigerTestLib
Quote:

> Did you derive from ITigerXTestLib?

> --
> =========================
> ============
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =========================
> ============



> > I'm trying to implement interface inheritance and I've a problem. I'm
> > getting a compilation error in the BEGIN COM MAP section.

> > Here is my code:

> > BEGIN COM MAP(CTigerXTestLib)
> > COM INTERFACE ENTRY(ITigerXTestLib)
> >         COM INTERFACE ENTRY(IBaseTigerTestLib)
> > COM INTERFACE ENTRY(IDispatch)
> > END COM MAP()

> > and the error is 'static cast' : cannot convert from 'class
> > CTigerXTestLib *' to 'struct ITigerXTestLib *'

> > I never had this problem before. Is it an inheritance issue?



Fri, 04 Mar 2005 21:38:30 GMT  
 Interface inheritance...
So is ITigerXTestLib derived from IBaseTigerTestLib then?

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> No... From BaseTigerTestLib


> > Did you derive from ITigerXTestLib?

> > --
> > =========================
> > ============
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD

> > MVP VC FAQ: http://www.mvps.org/vcfaq
> > =========================
> > ============



> > > I'm trying to implement interface inheritance and I've a problem. I'm
> > > getting a compilation error in the BEGIN COM MAP section.

> > > Here is my code:

> > > BEGIN COM MAP(CTigerXTestLib)
> > > COM INTERFACE ENTRY(ITigerXTestLib)
> > >         COM INTERFACE ENTRY(IBaseTigerTestLib)
> > > COM INTERFACE ENTRY(IDispatch)
> > > END COM MAP()

> > > and the error is 'static cast' : cannot convert from 'class
> > > CTigerXTestLib *' to 'struct ITigerXTestLib *'

> > > I never had this problem before. Is it an inheritance issue?



Sat, 05 Mar 2005 02:10:16 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. interface inheritance and exposing same interface

2. interface inheritance failing while referring the COM dll in .NET project

3. COM interface inheritance

4. interface inheritance raises exception while referring hte COM dll in .NET

5. Interface inheritance - problems with templates

6. Interface inheritance

7. ATL7 interface inheritance

8. Interface inheritance

9. Interface inheritance

10. Qns on Interface Inheritance, Multiple _NewEnums

11. Interface Inheritance w/ ATL

12. Interface Inheritance

 

 
Powered by phpBB® Forum Software