Python/COM/ADSI - Newbie questions
krajicek at ics.muni.cz
Tue Jul 27 16:38:43 CEST 2004
to date, I've done python programming for various
reasons and projects and I quite like it. I've been
using Win32All extensions and I am happy with
Now, I have to create some scripts which utilize
COM (my project involves replicating _huge_ amounts of data
to and from Active Directory).
I am familiar with COM in C++, but with PythonCOM,
I am completely lost :-((. So please forgive me for my
stuping questions ;-).
I want/have to use lower level ADSI interfaces, such
as IDirectoryObject and IDirectorySearch, for performance
reasons. And also, I want to avoid automation objects
at all costs (calling via IDispatch).
How do I just cast the COM object to (say) IDirectoryObject?
Where are my IID_* (IID_IADs, IID_IDirectorySearch, ...) constants,
I do need my IID_* constants ;-)).
I want to use a binding pattern, which works well in
1. ADsOpenObject('LDAP://RootDSE', 'UserName', 'Password',
2. Obtain default naming context NC from RootDSE
3. Obtain IDirectorySearch and IDirectoryObject on the default
I am able to interact with ADSI using win32com.client.Dispatch(),
but this is not the way I want to go.
Thanks for any clues. Are there any code samples I can look
Ondrej Krajicek \\// krajicek at ics.muni.cz
Institute of Computer Science,||Masaryk University Brno, CR
More information about the Python-list