Python and Active Directory

Augustine David augustine_david at yahoo.com
Fri Mar 10 02:23:50 CET 2000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello All,

I am attempting to reproduce the SDK examples below in Python.  I have ran
"makepy" on the type library,
but I am unsure how to call any of its classes using
"win32com.client.Dispatch".  Any input you can give me
would be appreciated.

[Visual Basic]

Dim np as IADsOpenDSObject
Dim myUser as IADs

Set np = GetObject("LDAP:")
Set myUser = np.OpenDSObject("LDAP://CN=Bob,DC=Microsoft,DC=com",_
                     vbNullString,vbNullString, ADS_SECURE_AUTHENTICATION)

[C++]

IADs *pObject;
HRESULT hr;
hr = ADsOpenObject(L"LDAP://CN=Bob,DC=Microsoft,DC=com",
        NULL,
        NULL,
        ADS_SECURE_AUTHENTICATION,
        IID_IADs,
        (void**) &pObject);


Thank You,

Augustine David
E-mail: augustine_david at yahoo.com
PGP Public Block: http://www.geocities.com/augustine_david/

"The illiterate of the 21st century will not be those who cannotread and
write,
 but those who cannot learn, unlearn and relearn." -- Alvin Toffer

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBOMhM3I/wLn/ri5nVEQLh5wCeMb457wP2fq/QtdTQtumwYjZiwpwAn3A8
6PXYih2VTTc3K1iixeSOgASL
=Irz3
-----END PGP SIGNATURE-----








More information about the Python-list mailing list