Yes, that is probably the case for COM. But in idl, you can define an interface 
that is not a COM interface. There is nothing preventing you to do that.
In my case, I have a idl where there are a few COM-interfaces defined, but also 
a few 'normal' (=not COM) interfaces.
For my use-case it doen't make sense to make them COM-interfaces. They are not 
mend to be used like this.
Why does the comtypes.client.GetModule ('myTlb.tlb') not allow this? Is there 
maybe a technical reason for it or is it a choice?

Thomas


-----Original Message-----
From: Thomas Heller [mailto:thel...@ctypes.org]
Sent: vrijdag 11 april 2014 14:12
To: comtypes-users@lists.sourceforge.net
Subject: Re: [comtypes-users] Why is a baseinterface mandatory?

Am 10.04.2014 14:30, schrieb Houtekier, Thomas:
> Hello,
>
> I have a COM-server application which I want to interact with from an
> python-application.
>
> I defined the idl file myself and compiled into a typelib.
>
> When I want to load the typelib (with GetModule('mytlb.tlb')), I get
> an
> exception:
>
> "Ignoring interface myInterface which has no base interface"
>
> The interface 'myInterface' does indeed not extend IUnknown or any
> other interface, because it makes no sense in this context.
>
> To overcome this, I modifies the 'myInterface' so it has the
> IUnknown-interface as base, and implemented the inherited methods (as
> empty stubs)
>
> So my question is: why can't I have custom-interfaces (that don't
> inherit IUnknown) in my library if I want to? Why is this imposed by
> tlbparser.py?

I believe the requirement that EVERY interface MUST derive from IUnknown is a 
basic COM requirement.

Thomas



------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration Continuously Automate 
Build, Test & Deployment Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users
This message is subject to the following terms and conditions: MAIL 
DISCLAIMER<http://www.barco.com/en/maildisclaimer>

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to