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;