Python/COM/ADSI - Newbie questions
Ondrej Krajicek
krajicek at ics.muni.cz
Tue Jul 27 10:38:43 EDT 2004
Hello all,
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
them.
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 ;-).
So...
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
C++:
1. ADsOpenObject('LDAP://RootDSE', 'UserName', 'Password',
ADS_SECURE_AUTHENTICATION)
2. Obtain default naming context NC from RootDSE
3. Obtain IDirectorySearch and IDirectoryObject on the default
naming context
4. etc.
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
at?
Best regards,
Ondra Krajicek
--
____________________________\\--//_________________________
Ondrej Krajicek \\// krajicek at ics.muni.cz
Institute of Computer Science,||Masaryk University Brno, CR
_____________________________//\\__________________________
More information about the Python-list
mailing list