COM Problems
nutritioustreat at my-deja.com
nutritioustreat at my-deja.com
Sun Feb 27 03:03:28 EST 2000
Okay...
I'm creating a very simple inprocess COM DLL in
C++. Call it Foo. There is a single interface in
Foo, IBar. And a class that implements IBar, Bar.
I run makepy on Foo.tlb, and get my Foo.py file.
I fire up Python and do:
import Foo
import pythoncom
unk = pythoncom.CoCreateInstance(Foo.Test.CLSID,
None, pythoncom.CLSCTX_INPROC_SERVER,
pythoncom.IID_IUnknown)
{success}
bar = unk.QueryInterface(Foo.ITest.CLSID)
and instead of happily getting my interface, I
get the following error message:
Traceback (innermost last):
File "<interactive input>", line 1, in ?
TypeError: There is no interface object
registered that supports this IID
the IBar interface is registered just fine, it
shows up in the OLE Viewer, etc. what does this
mean?
i can create a Bar just fine through Dispatch, by
doing:
bar = Foo.Bar()
but I want to do things with
CoCreateInstance/QueryInterface.
thanks,
nutritious treat
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list