[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: libldap with C Run-Time for Multithreaded-DLL



> -----Original Message-----
> From: Patrick Dreyer, SY-UCP [mailto:Patrick.Dreyer@swisscom-ucp.com]

> > > Is there a certain reason, why libldap has only 
> configurations for 
> > > building the library with C Run-Time for Singlethreaded and 
> > > Multithreaded? I'm specialy confused because liblber has a 
> > > configuration for building with C Run-Time for Multithreaded-DLL.
> 
> > It would help others to understand what you're talking about 
> > if you specified the platform you're working with, and which 
> > version of OpenLDAP.
> 
> Platform:         Win32
> OpenLDAP-Version: 2.1.7
> 
> I'm using OpenLDAPs liblber and libldap on Win32. The 
> project, I'm using those libraries for, has to be compiled 
> with C Run-Time set to Multithreaded-DLL, so should be the 
> two OpenLDAP libraries. The problem is, there is no 
> configuration for building the libldap library with C 
> Run-Time set to Multithreaded-DLL even liblber has one.

There is no configuration because libldap does not support use in a
multi-threaded program. You should use libldap_r instead, but it is not
documented and not officially supported for user applications. It is used by
slapd and slurpd, so it certainly works, but with many restrictions. For
example, an LDAP session handle may not be used by more than one thread.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 

<<attachment: winmail.dat>>