[python-win32] win32com.client.CastTo() & references to interfaces in other libr aries

Andrew MacIntyre Andrew.MacIntyre at aba.gov.au
Thu May 22 16:49:20 EDT 2003


I'm working with a package (ESRI ArcGIS) that supports a number of 
ActiveX controls.  Various methods of the generated interface classes 
are noted in comments to return references to objects not defined 
in the control type library, but which are defined in one of several 
"support" type libraries.

Looking at the makepy generated files for the support libraries, I 
find that many interfaces don't have class definitions, but do have 

<interface>_vtables_dispatch_ = ?
<interface>_vtables_ = [ <list of member tuples> ]

sections, where the "?" is usually either 0 or 1.  Other interfaces 
have both the class definition and the "_vtables..." definitions.

What is the significance of this?  How can I access the members of 
an interface which has no class definition?

After coming across a reference by MarkH to CastTo() in the list 
archives, and not finding any docs, I perused the source.

Unfortunately, the current version's comments note that support for 
interfaces in other type libraries doesn't yet exist :-(.

If its not obvious, I'm new to COM programming in general, and 
Pythonwin (but not Python) in particular.  If anyone has some 
recommendations for books or online resources, especially 
non-trivial application sources that I can look over for 
enlightment, that would be most appreciated.

Regards,
Andrew.

-----------------------------------------------------------------------
Andrew MacIntyre                  \ E-mail: andrew.macintyre at aba.gov.au
Planning & Licensing Branch        \ Tel:   +61 2 6256 2812
Australian Broadcasting Authority   \ Fax:  +61 2 6253 3277
-> "These thoughts are mine alone!" <----------------------------------
 



More information about the Python-win32 mailing list