ldap_init() can partly work but ldap_open works well

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have met a stang thing:. After call ldap_init(), pLDAP is not null, but
it member "ld_host" is NULL, (it should be "192.168.0.78"). and the following
set_option works well.

I have try to use both VC6's Wldap32.lib and platform Wldap32.lib.
And my current WLDAP32.DLL is 159K and modified at 2003/06/19 12:05. Is
this version incorrect?

Does any have the same experience?
Wish someone kind enlighten me.



The following is my codes.

PTCHAR hostName = "192.168.0.78";
pLDAP = ldap_init(hostName, LDAP_PORT) ;
if (pLDAP == NULL)
{
return;
}

ULONG version = LDAP_VERSION3;
ldap_set_option(pLDAP, LDAP_OPT_PROTOCOL_VERSION, &version);
 
I have met a stang thing:. After call ldap_init(), pLDAP is not null, but
it member "ld_host" is NULL, (it should be "192.168.0.78"). and the following
set_option works well.

I have try to use both VC6's Wldap32.lib and platform Wldap32.lib.

The wldap32.lib supplied with VC6 was incorrect - you need to use an
updated version from a more recent platform SDK installation (though
whether there are any later mis-matches, I don't know - I'm not aware
of any). Best thing is to ensure you're not using the corrupt VC6 lib
- delete it.

Dave
 
Back
Top