To exemplify, when I try to call PutEx on <PyIADs at 0x0264A260 with obj at 0x003C1EB8>, which was obtained by calling QueryInterface(IID_IADs) on an object returned from IADsContainer.GetObject, I get an AttributeError: 'PyIADs' object has no attribute 'PutEx'. This correlates with the documentation for PyIADs at http://docs.activestate.com/activepython/2.5/pywin32/PyIADs.html. The __class__ of objects returned by GetObject, is <type 'PyIADs'>, whereas for Create it is <class win32com.adsi.ADSIDispatch at 0x0288DD20>. Why not just the second class, which appears more complete (i.e., it implements PutEx)?
Arve On Mon, Aug 3, 2009 at 11:17 PM, Arve Knudsen <arve.knud...@gmail.com>wrote: > Well, for one the representations of the objects returned by the two > methods are different and with one type I can access .PutEx but not > with the other. > > Arve > > On 8/3/09, Tim Roberts <t...@probo.com> wrote: > > Arve Knudsen wrote: > >> > >> I am thoroughly confused by win32com.adsi at this point. Right now I > >> am finding that IADsContainer.GetObject returns objects of a different > >> type than IADsContainer.Create, that expose only a subset of the > >> expected methods! > > > > How do you know? Are you using dir() to look at the list of methods? > > That's not reliable with COM objects, unless you have used makepy on > > them. The win32com stuff doesn't go query the complete list of methods > > and properties. When you ask for one, it checks for it, and will > > remember that for later. > > > > -- > > Tim Roberts, t...@probo.com > > Providenza & Boekelheide, Inc. > > > > _______________________________________________ > > python-win32 mailing list > > python-win32@python.org > > http://mail.python.org/mailman/listinfo/python-win32 > > > > -- > Sent from my mobile device >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32