How To Use LdapSend

See next sample. Just create simple application with one button and one memo, and on button's onClick event call next code:

procedure TForm1.Button53Click(Sender: TObject);
var
  ldap: TLDAPsend;
  l: TStringList;
begin
  ldap:= TLDAPsend.Create;
  l := TStringList.Create;
  try
    ldap.TargetHost := 'www.openldap.com';
    ldap.Login;
    ldap.Bind;
    l.Add('displayname');
    l.Add('description');
    l.Add('givenName');
    l.Add('*');
    ldap.Search('dc=OpenLDAP,dc=org', False, '(objectclass=*)', l);
    memo1.Lines.Add(LDAPResultdump(ldap.SearchResult));
    ldap.Logout;
  finally
    ldap.Free;
    l.Free;
  end;
end;
public/howto/ldapsample.txt · Last modified: 2007/11/30 14:30 (external edit)
Driven by DokuWiki Recent changes RSS feed