[python-win32] Win32com , how select coclass interface?
e8micke
e8micke at yahoo.com
Wed Oct 18 16:41:27 CEST 2006
Hi!
I have a DLL that have several interfaces accociated
with a CoClass, but there is one default interface.
snip from my genpy generated .py file:
------------------------------
from win32com.client import CoClassBaseClass
# This CoClass is known by the name
'BK.BasicEnv.Application.RemoteAPI'
class RemoteAPI(CoClassBaseClass): # A CoClass
CLSID = IID('{5BC25821-4936-4E9E-9ACF-12E12ADDA9CC}')
coclass_sources = [
]
coclass_interfaces = [
I2250Instrument,
IDisposable,
I2250Control,
IRemoteAPI,
IRemoteInfo,
I2250Connect,
_Object,
I2250Archive,
I2250Export,
]
default_interface = IRemoteAPI
--------------------
This is the result of usage:
>>> import win32com.client
>>> q =
win32com.client.Dispatch("BK.BasicEnv.Application.RemoteAPI")
>>> q
<win32com.gen_py.Env Programming Interface.IRemoteAPI
instance at 0x15301248>
How can I use other coclass interfaces e.g.
"I2250Instrument" instead of IRemoteAPI?
Thanks in advance
Mikael
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Python-win32
mailing list