[python-win32] QueryInterface woes

Steven Scott bodoni26@resnet.gatech.edu
Tue, 11 Feb 2003 17:21:31 -0500


I'm connecting to Domino through it's COM interface with PythonCOM, and I=
've
been able to do everything I need to until now.
I have a method which returns an object of type IItem.  Well, the Domino =
COM
interface has this method.  IItem has a "subclass" (I'm not up on all the
fancy COM terminology) called IRichTextItem.  I need to take the result o=
f
this method, which is an IItem, and call methods on it which only exist i=
n
IRichTextItem (yes, it is really an IRichTextItem).  anyway, the COM peop=
le
around here say that I need to use QueryInterface to get the richtext
interface as opposed to just the regular item.

How do I go about this?

So far I've tried messing around with my object, and calling

 body._oleobj_.QueryInterface()

with different stuff.  Pretty much anything I put in resulted with some
error about it not being able to find that IID, or something.  I went int=
o
the gen_py directory and got the Domino file, and tried QI() with the
IRichTextItem CLSID (in the form '{29131574-2EED-1069-BF5D-00DD011186B7}'=
)
and in this case I get the error "There is no interface object registered
that supports this IID".

anyway I'm really at a loss, any help would be appreciated.

--=20
Steven Scott [Bodoni26@resnet.gatech.edu]
Don't give up fighting, 'til nothing else stands in your way..Don't
give up talking, until there's nothing left to say....But no matter