ldap_open and ldap_init with Active Directory

All my ldap programs have till now used the OpenLdap server. As we are now migrating to the Ldap fronted of Active Directory I had to migrate quite a few c programs. But here is the problem:
If I use ldap_init it will fail and shout at me
ldap_simple_bind_s: Can't contact LDAP server 
but if I use ldap_open it all works. No idea why this is happening. But ldap_open is deprecated so lots of fun coming up. That's what you get for writing c programs.

No comments: