We infer that the object implements IWshShell3 which declared the CurrentDirectory property. From the TLB info, we know about CurrentDirectory right away. However, SpecialFolders is declared on the base interface IWhsShell. Looks like we just need to walk up the class hierarchy. We currently don't do this. I have opened http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=16107 to track this.
SpecialFolders does appear when you use it because we use IDispatch.GetIDsOfNames on it, and it is there ofcourse. Thanks, Shri Want to work on IronPython, IronRuby, F#<http://blogs.msdn.com/ironpython/archive/2008/02/25/ironpython-ironruby-and-f-openings-in-dev-test-and-pm.aspx>? Visit http://blogs.msdn.com/ironpython/ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davy Mitchell Sent: Saturday, April 12, 2008 11:53 PM To: Discussion of IronPython Subject: [IronPython] PreferComDispatch - Odd Behaviour IP2.0.0.1000 from System import Type, Activator wb = Activator.CreateInstance(Type.GetTypeFromProgID("WScript.Shell")) print dir(wb) print wb.CurrentDirectory() print wb.SpecialFolders("Desktop") print dir(wb) The first dir of wb is missing a method which appears as soon as a call is made to it. Interestingly CurrentDirectory is listed in the first dir without being called. ['CreateObjRef', 'CurrentDirectory', 'Equals', 'Exec', 'Finalize', 'GetAttrNames ', 'GetHashCode', 'GetLifetimeService', 'GetMemberNames', 'GetType', 'Initialize LifetimeService', 'MemberwiseClone', 'ReferenceEquals', 'ToString', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__' , '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__'] c:\code\comtry c:\users\daftspaniel\desktop ['CreateObjRef', 'CurrentDirectory', 'Equals', 'Exec', 'Finalize', 'GetAttrNames ', 'GetHashCode', 'GetLifetimeService', 'GetMemberNames', 'GetType', 'Initialize LifetimeService', 'MemberwiseClone', 'ReferenceEquals', 'SpecialFolders', 'ToStr ing', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__ init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '_ _str__'] Thanks, Davy Mitchell -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel http://needgod.com
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
