On 27 Mar 2006 00:19:09 -0800, Axel Bock <[EMAIL PROTECTED]> wrote: > I am fooling around with the Python-COM bridge, and I have a little > question with that. > > In the component I am using is a method which will return an "Entry" > object - basically. In truth it returns some object which inherits from > entry, and I know which one, but - as said - the method will only > return the IEntry interface pointer. Now I would like to cast that one > to the one I need :) . Is there an easy way to do it, or do I have to > use the QueryInterface-method to get what I want?
There's an easy way - use win32com.client.CastTo(). See the convert_tracks.py script on this page - <http://www.brunningonline.net/simon/blog/archives/001742.html> for an example. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list