Establishes a connection for LDAP transactions with a specified host.
WebAPI.bdh
WebLdapConnect( inout hLDAP : number, in sHost : string, in nPort : number, in nFlag : number optional ): boolean;
true if the connection attempt was completed successfully
false otherwise
Parameter | Description |
---|---|
hLDAP |
Variable receiving a handle to the Web connection If this parameter contains a handle to a Web connection prior to the WebLdapConnect function call, the memory allocated with the handle is released. Whenever you want to create a new Web connection, make sure this variable is initialized with 0 (this is automatically done within transactions when they are executed for the first time, but not within functions) |
sHost | Domain name or IP address of the LDAP server, for example, hostname.com or 192.231.34.1 |
nPort | Port to connect to, usually WEB_PORT_LDAP (389) |
nFlag |
Flag specifiying the LDAP version (optional):
Besides, this flag specifies additional configuration of secure queries. Possible values are:
This value has to be set to 0 for insecure transactions (default). |
dcltrans transaction TWebLdap var hLdap: number; begin WebLdapConnect(hLdap, "standardhost", WEB_PORT_LDAP); WebLdapDisconnect(hLdap); end TWebLdap;
LDAP.sep