Share this page

# Example: mldap_set_option_ex

This example shows mldap_set_option_ex setting TLS to ON before conducting a search.

    mldap1 = 0;
    mldap_logon_ex(&mldap1,
        "LdapLogon",
        "URL=ldap://100.100.100.100",
        "Version=3",
        "SSLCertDir=e:\\LdapServerCertificates\\",
        LAST );

    mldap_search_ex(&mldap1,
        "LdapSearch",
        "Base=",
        "Scope=Base",
        "Filter=objectclass=*",
        LAST );

    //Enables TLS on a current session.

    mldap_set_option_ex(&mldap1, "TLS=ON", LAST );

    mldap_search_ex(&mldap1,
        "LdapSearch",
        "Base=cn=Recipients,ou=qalab,o=qalab",
        "Scope=Subtree",
        "Filter=(rdn=QAtest)",
        LAST );

    mldap_logoff(&mldap1);LAST );

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: