Unable to create com object - need help
Roman Yakovenko
roman.yakovenko at actimize.com
Wed Apr 14 01:35:11 EDT 2004
Hi. I need some help.
Here is my situation. It is a little bit difficult to explain and/or understand.
I'd like to use msdia71.dll. This dll gives you access to program database files
created during a build. I register this dll. This is pure com dll.
This dll contains 3 top classes. I'd like to create one of them - DiaSource.
This class implements IDiaDataSource interface. This fact I can see in dia2.idl.
importlib("stdole2.tlb");
[
uuid(e60afbee-502d-46ae-858f-8272a09bd707),
helpstring("DiaSource Class")
]
coclass DiaSource
{
[default] interface IDiaDataSource;
};
after using makepy I get
class DiaSource(CoClassBaseClass): # A CoClass
# DiaSource Class
CLSID = IID('{E60AFBEE-502D-46AE-858F-8272A09BD707}')
coclass_sources = [
]
coclass_interfaces = [
]
If I understand right DiaSource doesn't implements IDiaDataSource interface at all.
May be this is a bug, may be I don't understand something. Clarifying this point will be great.
There is an other thing, that I don't understand. I can create an instance of this class
in VisualBasic 6.0 . (I added a reference to this dll into project).
One more thing: I find out that if I use low level api of "pythoncom" module I can create instance
of DiaSource class that the only interface it implements is IUnknown. Here I need small hint -
what can I do with this instance? More specifiec how can I get the desired interface.
( QueryInterface does not work in this case. see makepy section of this latter )
Or how can I call functions ?
I am sorry for such long posting. Also thank you very much for help.
Roman
More information about the Python-list
mailing list