Accessing secondary COM interface with win32com
mhammond at skippinet.com.au
Wed Mar 15 22:55:34 CET 2000
Im not sure what you are asking.
If you need to use custom COM interfaces defined by your app, then you
are out of luck. You will need to get down at the C level (although
we have tools that will help generate the code).
If you simply want to use a different IDispatch interface from an
object - you should be able to do something like:
old_interface = win32com.client.Dispatch(Your.App")
module = gencache.GetModuleForProgID("Your.App")
new_interface = module.NewInterfaceName(old_interface)
"D. Ellis" <dellis_moreinc at yahoo.com> wrote in message
news:8aonqf$8o7$1 at sloth.swcp.com...
> I'm new to python, but it seems very cool. I want to use it to help
> Windows application I'm working on. I'm trying to use win32com to
test a COM
> server (written in C++). I can easily create instances of objects
> pythoncom.new() and win32com.client.Dispatch(), but for some of
> objects I need to use multiple COM interfaces. What is the correct
> use multiple interfaces on these objects? How do I refer to the IID
> symbolically (instead of literally)? They seem to be buried in the
> generated by makepy and stored as the values (instead of keys) in a
> dictionary used (internally, I presume) by
> just want to be able to access these classes or IIDs in my program.
> Any help is greatly appreciated.
More information about the Python-list